Hi Olivier,<br><br>here is solutions for your situation , ideally you need to talk with Provider and they can set SIP URI<br>for given DID numbre , but that can be solved by dial-plan like this.<br><br><br>exten => _003318364xxxx,1,Set(foo=${SIP_HEADER(To)})<br>
exten => _003318364xxxx,n,Set(cut1=${CUT(foo,:,2)})<br>exten => _003318364xxxx,n,Set(CLI=${CUT(cut1,>,1)})<br>exten => _003318364xxxx,n,Set(toexten=${CUT(CLI,@,1)})<br>exten => _003318364xxxx,n,Noop(ORIGINAL NUMBER : [ ${toexten} ])<br>
exten => _003318364xxxx,n,ExecIf($["${toexten}" = "81169xxxx"]?Dial(SIP/204,180,rt):Noop(${toexten}))<br>exten => _003318364xxxx,n,ExecIf($["${EXTEN}" = "003318364xxxx"]?Dial(SIP/203,180,rt):Noop(${toexten}))<br>
<br><br><div class="gmail_quote">On Thu, Mar 24, 2011 at 11:13 AM, Olivier CALVANO <span dir="ltr"><<a href="mailto:o.calvano@gmail.com">o.calvano@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi<br>
<br>
Anyone know a solution at my problems ?<br>
<br>
Thanks<br>
Olivier<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
2011/3/23 Olivier CALVANO <<a href="mailto:o.calvano@gmail.com">o.calvano@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Hi<br>
><br>
> I request your help because i don't have actually a solution at my problems.<br>
><br>
><br>
> I have a Asterisk Server in 1.6<br>
> Connected at a SIP Provider<br>
> This provider supply me 2 numbers:<br>
> 003318364xxxx (official number)<br>
> 081169xxxx (Nddi Number)<br>
><br>
> When i receive a call on the 081169xxxx, he don't use<br>
> the extension. He use the 003318364xxxx extension.<br>
><br>
> SIP Debug:<br>
><br>
> <--- SIP read from UDP://91.121.xxx.xxx:5060 ---><br>
> INVITE sip:003318364xxxx@78.41.xxx.xxx:5060;transport=udp SIP/2.0<br>
> Allow: UPDATE,REFER,INFO<br>
> Call-ID: <a href="mailto:04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net">04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net</a><br>
> Contact: <sip:91.121.xxx.xxx:5060><br>
> Content-Type: application/sdp<br>
> CSeq: 1602837515 INVITE<br>
> From: "033426aaaaaa"<br>
> <<a href="mailto:sip%3A033426aaaaaa@sip.myoperator.net">sip:033426aaaaaa@sip.myoperator.net</a>;user=phone>;tag=04459-CI-5fa6f8a1-6f03b5b60<br>
> Max-Forwards: 30<br>
> P-Preferred-Identity: <<a href="mailto:sip%3A033426aaaaaa@sip.myoperator.net">sip:033426aaaaaa@sip.myoperator.net</a>;user=phone><br>
> To: <sip:081169xxxx@91.121.xxx.xxx;user=phone><br>
> User-Agent: Cirpack/v4.42s (gw_sip)<br>
> Via: SIP/2.0/UDP 91.121.xxx.xxx:5060;branch=z9hG4bK-4B4B-2D82DB2<br>
> Content-Length: 481<br>
><br>
> v=0<br>
> o=cp10 130085910854 130085910854 IN IP4 10.7.1.121<br>
> s=SIP Call<br>
> c=IN IP4 91.121.bbb.bbb<br>
> t=0 0<br>
> m=audio 36146 RTP/AVP 18 4 0 8 125 111 101<br>
> b=AS:21<br>
> a=rtpmap:18 G729/8000/1<br>
> a=fmtp:18 annexb=no<br>
> a=rtpmap:4 G723/8000/1<br>
> a=fmtp:4 annexa=no<br>
> a=rtpmap:0 PCMU/8000/1<br>
> a=rtpmap:8 PCMA/8000/1<br>
> a=rtpmap:125 CLEARMODE/8000/1<br>
> a=rtpmap:111 iLBC/8000/1<br>
> a=fmtp:111 mode=30<br>
> a=rtpmap:101 telephone-event/8000<br>
> a=fmtp:101 0-15<br>
> a=ptime:30<br>
> a=sendrecv<br>
> a=sqn:0<br>
> a=cdsc: 1 image udptl t38<br>
><br>
> <-------------><br>
> --- (13 headers 22 lines) ---<br>
> Sending to 91.121.xxx.xxx : 5060 (no NAT)<br>
> Using INVITE request as basis request -<br>
> <a href="mailto:04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net">04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net</a><br>
> Found peer 'Myoperator' for '033426aaaaaa' from 91.121.xxx.xxx:5060<br>
> Found RTP audio format 18<br>
> Found RTP audio format 4<br>
> Found RTP audio format 0<br>
> Found RTP audio format 8<br>
> Found RTP audio format 125<br>
> Found RTP audio format 111<br>
> Found RTP audio format 101<br>
> Peer audio RTP is at port 91.121.bbb.bbb:36146<br>
> Found audio description format G729 for ID 18<br>
> Found audio description format G723 for ID 4<br>
> Found audio description format PCMU for ID 0<br>
> Found audio description format PCMA for ID 8<br>
> Found unknown media description format CLEARMODE for ID 125<br>
> Found audio description format iLBC for ID 111<br>
> Found audio description format telephone-event for ID 101<br>
> Capabilities: us - 0x109 (g723|alaw|g729), peer - audio=0x50d<br>
> (g723|ulaw|alaw|g729|ilbc)/video=0x0 (nothing)/text=0x0 (nothing),<br>
> combined - 0x109 (g723|alaw|g729)<br>
> Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1<br>
> (telephone-event), combined - 0x1 (telephone-event)<br>
> Peer audio RTP is at port 91.121.bbb.bbb:36146<br>
> Looking for 003318364xxxx in Appels-Entrants (domain 78.41.xxx.xxx)<br>
><br>
> <--- Reliably Transmitting (no NAT) to 91.121.xxx.xxx:5060 ---><br>
> SIP/2.0 404 Not Found<br>
> Via: SIP/2.0/UDP<br>
> 91.121.xxx.xxx:5060;branch=z9hG4bK-4B4B-2D82DB2;received=91.121.xxx.xxx<br>
> From: "033426aaaaaa"<br>
> <<a href="mailto:sip%3A033426aaaaaa@sip.myoperator.net">sip:033426aaaaaa@sip.myoperator.net</a>;user=phone>;tag=04459-CI-5fa6f8a1-6f03b5b60<br>
> To: <sip:081169xxxx@91.121.xxx.xxx;user=phone>;tag=as50e04b6a<br>
> Call-ID: <a href="mailto:04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net">04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net</a><br>
> CSeq: 1602837515 INVITE<br>
> Server: Asterisk PBX 1.6.1.8<br>
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO<br>
> Supported: replaces, timer<br>
> Content-Length: 0<br>
><br>
><br>
> <------------><br>
> [Mar 23 06:45:08] NOTICE[10626]: chan_sip.c:18527<br>
> handle_request_invite: Call from '0033459aaaaaa' to extension<br>
> '003318364xxxx' rejected because extension not found.<br>
> Scheduling destruction of SIP dialog<br>
> '<a href="mailto:04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net">04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net</a>' in 6400 ms (Method:<br>
> INVITE)<br>
> <--- SIP read from UDP://91.121.xxx.xxx:5060 ---><br>
> ACK sip:003318364xxxx@78.41.xxx.xxx:5060;transport=udp SIP/2.0<br>
> Call-ID: <a href="mailto:04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net">04459-NK-5fa6f8a0-18641fd41@sip.myoperator.net</a><br>
> Contact: <sip:91.121.xxx.xxx:5060><br>
> CSeq: 1602837515 ACK<br>
> From: "033426aaaaaa"<br>
> <<a href="mailto:sip%3A033426aaaaaa@sip.myoperator.net">sip:033426aaaaaa@sip.myoperator.net</a>;user=phone>;tag=04459-CI-5fa6f8a1-6f03b5b60<br>
> Max-Forwards: 30<br>
> To: <sip:081169xxxx@91.121.xxx.xxx;user=phone>;tag=as50e04b6a<br>
> User-Agent: Cirpack/v4.42s (gw_sip)<br>
> Via: SIP/2.0/UDP 91.121.xxx.xxx:5060;branch=z9hG4bK-4B4B-2D82DB2<br>
> Content-Length: 0<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> I see in the debug:<br>
> To: <sip:081169xxxx@91.121.xxx.xxx;user=phone><br>
><br>
> but he search the 003318364xxxx extension<br>
> [Mar 23 06:45:08] NOTICE[10626]: chan_sip.c:18527<br>
> handle_request_invite: Call from '0033459aaaaaa' to extension<br>
> '003318364xxxx' rejected because extension not found.<br>
><br>
><br>
><br>
><br>
> Anyone know the solution for he use the extension based on the "To:" ?<br>
><br>
> thanks<br>
> Olivier<br>
><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>