Joseph L. Casale
2008-May-19 18:12 UTC
[asterisk-users] Understanding Incoming sip DID handling
Hi, What is the method (preferred) way Asterisk handles the incoming sip lines? I am currently trying to setup two lines, one has unlimited in/out channels and the other phone number has only two. The provider has given a macro that manages dialing out on the two possible servers. Would I match on phone number to decide where to send it? Both lines can originate from two different servers so matching by IP wouldn't help as both share either/or server. Thanks! jlc
Sherwood McGowan
2008-May-19 18:26 UTC
[asterisk-users] Understanding Incoming sip DID handling
Joseph L. Casale wrote:> Hi, > What is the method (preferred) way Asterisk handles the incoming > sip lines? I am currently trying to setup two lines, one has > unlimited in/out channels and the other phone number has only two. > > The provider has given a macro that manages dialing out on the two > possible servers. > > Would I match on phone number to decide where to send it? Both lines > can originate from two different servers so matching by IP wouldn't > help as both share either/or server. > > Thanks! > jlc > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >Yes, in your dialplan you should have one extension set up for the first number and where to send it, and a second for the other.
Joseph L. Casale
2008-May-19 18:47 UTC
[asterisk-users] Understanding Incoming sip DID handling
>Yes, in your dialplan you should have one extension set up for the first >number and where to send it, and a second for the other.So, if the sip.conf config sends the did into the [incoming] context and its phone number is 555-1212, would this be the right way: exten => 5551212,1,`Do Something` ? How do I elegantly write something to catch the area code, if the number dialed was 1-xxx-555-1212? Or does the incoming number from my sip provider always show up to me as an 11 digit number: exten => 19495551212,1,`Do Something` for example? If that sip account turfed the call into a custom context, [incoming_1] and nothing else entered it (the other line went its own, [incoming_2], I suppose I could just write: exten => s,1,`Do Something` which eliminates this question? Thanks for all the guidance! jlc
Steve Edwards
2008-May-19 19:00 UTC
[asterisk-users] Understanding Incoming sip DID handling
On Mon, 19 May 2008, Joseph L. Casale wrote:> How do I elegantly write something to catch the area code, if the number dialed was > 1-xxx-555-1212? Or does the incoming number from my sip provider always show up to me > as an 11 digit number: > > exten => 19495551212,1,`Do Something` for example?I always get 10 digits from my providers. You can define an exact or (as below) a matching pattern.> If that sip account turfed the call into a custom context, [incoming_1] and nothing else > entered it (the other line went its own, [incoming_2], I suppose I could just write: > > exten => s,1,`Do Something` which eliminates this question?exten = _x.,1, playback(demo-congrats) exten = _x.,n, hangup Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000