Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Punchblock incorrectly prefixes caller ID on Asterisk with "SIP/" #114

Open
bklang opened this issue Oct 24, 2012 · 3 comments
Open

Punchblock incorrectly prefixes caller ID on Asterisk with "SIP/" #114

bklang opened this issue Oct 24, 2012 · 3 comments
Labels

Comments

@bklang
Copy link
Member

bklang commented Oct 24, 2012

Given this offer:

Event: AsyncAGI
Privilege: agi,all
SubEvent: Start
Channel: SIP/blink-00000001
Env: agi_request%3A%20async%0Aagi_channel%3A%20SIP%2Fblink-00000001%0Aagi_language%3A%20en%0Aagi_type%3A%20SIP%0Aagi_uniqueid%3A%201351113812.1%0Aagi_version%3A%20SVN-branch-1.8-r375325%0Aagi_callerid%3A%202633992505%0Aagi_calleridname%3A%20Aron%20Seaman%0Aagi_callingpres%3A%200%0Aagi_callingani2%3A%200%0Aagi_callington%3A%200%0Aagi_callingtns%3A%200%0Aagi_dnid%3A%20demo%0Aagi_rdnis%3A%20unknown%0Aagi_context%3A%20adhearsion%0Aagi_extension%3A%20demo%0Aagi_priority%3A%201%0Aagi_enhanced%3A%200.0%0Aagi_accountcode%3A%20%0Aagi_threadid%3A%20140286889207552%0A%0A

I get this Punchblock Offer:

[2012-10-24 17:23:32] DEBUG Adhearsion::Call: : Receiving message: #<Punchblock::Event::Offer to="demo", from="Aron Seaman <SIP/2633992505>", headers={:x_agi_request=>"async", :x_agi_channel=>"SIP/blink-00000001", :x_agi_language=>"en", :x_agi_type=>"SIP", :x_agi_uniqueid=>"1351113812.1", :x_agi_version=>"SVN-branch-1.8-r375325", :x_agi_callerid=>"2633992505", :x_agi_calleridname=>"Aron Seaman", :x_agi_callingpres=>"0", :x_agi_callingani2=>"0", :x_agi_callington=>"0", :x_agi_callingtns=>"0", :x_agi_dnid=>"demo", :x_agi_rdnis=>"unknown", :x_agi_context=>"adhearsion", :x_agi_extension=>"demo", :x_agi_priority=>"1", :x_agi_enhanced=>"0.0", :x_agi_accountcode=>"", :x_agi_threadid=>"140286889207552"}, call_id="fe8e3fca-7766-4266-a0be-8a5c0617ca86"
@benlangfeld
Copy link
Member

The idea is for the caller ID to be something we can use in a later dial command. We need to figure out a better scheme for this.

@bklang
Copy link
Member Author

bklang commented Oct 24, 2012

Even if that's the case, we are now leaking an implementation detail (Asterisk channel drivers) into application code. But even more to the point, 'SIP/4045551234' is nonsense to Asterisk.

@benlangfeld
Copy link
Member

I disagree about "leaking an implementation detail". We could construct some sort of fake SIP URI, but it would be useless in the scenario where we attempt to do a callback like this:

class CallbackController < Adhearsion::CallController
  def ruby
    dial call.from
  end
end

As to the point about 'SIP/4045551234' being nonsense, can we define some better rules for how this string should be created? The code is here: https://github.com/adhearsion/punchblock/blob/develop/lib/punchblock/translator/asterisk/call.rb#L336

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants