I'm currently handling it with: <param name="context" value="numbergroup"/> and: <context name="numbergroup"> <extension name="numbergroup"> <condition field="destination_number" expression="^USERNAME$"> <action application="transfer" data="${sip_to_user} XML default"/> </condition> </extension> </context> Is there a better way of handling it? Such as a param that tells Sofia to use the To not the URI to populate destination_number? -Steve On 7 January 2011 21:08, Steven Ayre <steveayre@gmail.com> wrote:
Hi everyone,
I have a gateway registering to numbergroup.com, this is the configuration:
<gateway name="numbergroup"> <param name="realm" value="sip.numbergroup-services.com"/> <param name="username" value="XXXXXX"/> <param name="password" value="XXXXXX"/> <param name="register" value="true"/> <param name="extension-in-contact" value="true"/> <param name="caller-id-in-from" value="true"/> <param name="ping" value="60"/> <param name="ping-max" value="10"/> <param name="ping-min" value="1"/> <param name="retry-seconds" value="5"/> <param name="expire-seconds" value="60"/> </gateway>
Incoming calls from my DID to a SIP URI on the server work fine. However I'm having problems sending it to the SIP Trunk (the registration above).
The call arrives on the server fine, but the URI is the username@sip.numbergroup-services.com. The DID is in the To: header
destination_number in the dialplan is the username not the DID as a result. Does anyone know how to configure the gateway so that the destination_number would contain the DID from the To header instead?
Here's the INVITE:
INVITE sip:username@81.27.101.246:5060;transport=udp;gw=numbergroup SIP/2.0 Via: SIP/2.0/UDP 80.93.165.111;rport;branch=z9hG4bKD4m88SNemDSBg Max-Forwards: 65 From: "+myphonenumber" <sip:+myphonenumber@80.93.165.111>;tag=y9DBpB33yBHNN To: <sip:+mydidnumber@sip.numbergroup-services.com> Call-ID: 9ee8ce2d-9544-122e-c2a7-002655d1d302 CSeq: 6881084 INVITE Contact: <sip:numbergroup@80.93.165.111:5060> User-Agent: numbergroup.com Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, UPDATE, INFO, REGISTER, REFER, NOTIFY Supported: timer, precondition, path, replaces Allow-Events: talk, hold, refer Session-Expires: 900 Min-SE: 90 Privacy: none Content-Type: application/sdp Content-Disposition: session Content-Length: 593 P-Charging-Vector: icid-value=f4571a9c-1aa1-11e0-8310-5798bfd3ad89;icid-generated-at=80.93.165.110;orig-ioi=numbergroup.com P-Asserted-Identity: "+myphonenumber" <sip:+myphonenumber@80.93.165.111>
v=0 o=numbergroup 1294416066 1294416067 IN IP4 80.93.165.111 s=numbergroup c=IN IP4 80.93.165.111 t=0 0 m=audio 18230 RTP/AVP 8 9 98 3 18 99 100 101 102 103 104 0 105 101 13 a=rtpmap:98 G7221/32000 a=fmtp:98 bitrate=48000 a=rtpmap:99 SPEEX/8000 a=rtpmap:100 iLBC/8000 a=fmtp:100 mode=20 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=rtpmap:102 G726-24/8000 a=rtpmap:103 G726-32/8000 a=rtpmap:104 G726-40/8000 a=rtpmap:105 CELT/48000 m=video 18540 RTP/AVP 106 107 34 31 a=rtpmap:106 THEORA/90000 a=rtpmap:107 H264/90000 a=rtpmap:34 H263/90000 a=rtpmap:31 H261/90000
-Steve