----------from extensions.conf--------------- [general] static = yes writeprotect = no clearglobalvars = no disallow=all allow=ulaw allow=alaw allow=gsm allow=ilbc [globals] PHONE = SIP/101&SIP/102&SIP/103&SIP/104 ;Zap/2& ... &Skinny/501@501 CONSOLE = Console/dsp #include "extensions.d/*.conf" [phones] #include "extensions-phones.d/*.conf" ; Only incoming audio, no outgoing audio: [fromgizmo] exten => gizmoguy,1,Answer exten => gizmoguy,n,Wait(1) exten => gizmoguy,n,SendDTMF(1) exten => gizmoguy,n,Dial(${PHONE}) ;; Works fine: ;exten => gizmoguy,1,Dial(${PHONE}) --------------------------------------------- -----------from extensions-phones.d/101.conf- exten => 101,1,Dial(SIP/101) ;I think you can guess what the others look like --------------------------------------------- -----------from sip-phones.d/101.conf-------- [101] type=friend secret=omgshhhhhh context=default callerid=Ext 101 <101> host=dynamic nat=yes canreinvite=no insecure=very disallow=all allow=ulaw allow=alaw allow=gsm allow=ilbc --------------------------------------------- -----------from sip.conf--------------------- [general] context=default allowoverlap=no bindport=5060 bindaddr=0.0.0.0 srvlookup=yes nat=yes localnet=10.4.20.0/255.0.0.0 disallow=all allow=ulaw allow=alaw allow=gsm allow=ilbc ;----------------------------------------- NAT SUPPORT ------------------------ ; The externip, externhost and localnet settings are used if you use Asterisk ; behind a NAT device to communicate with services on the outside. externip = my.home.address ; For global parameters and 'register' entries: #include "sip-reg.d/*.conf" ; For peers, each in its own section: #include "sip-phones.d/*.conf" [authentication] --------------------------------------------- ----------from sip-phones.d/gizmo.conf------- [gizmophone] type=friend context=fromgizmo dtmfmode=info host=proxy01.sipphone.com fromdomain=proxy01.sipphone.com insecure=very username=gizmoguy fromuser=gizmoguy authuser=gizmoguy secret=omgshhhhh disallow=all allow=ulaw allow=alaw allow=gsm allow=ilbc ---------------------------------------------- ----------------A call------------------------ <--- SIP read from 198.65.166.131:5060 ---> INVITE sip:gizmoguy@XXX.XXX.XXX.XXX SIP/2.0 Record-Route: Max-Forwards: 16 To: Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bKc287.ae1c27a3.0 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK634373567 From: ;tag=1111285111 Call-ID: 150389463@63.80.235.211 CSeq: 6168 INVITE User-Agent: YATE/1.2.0 Contact: Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO Content-Type: application/sdp Content-Length: 185 RemoteIP: 63.80.235.211 v=0 o=yate 1192718172 1192718172 IN IP4 63.80.235.211 s=SIP Call c=IN IP4 63.80.235.211 t=0 0 m=audio 20600 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 <-------------> --- (15 headers 8 lines) --- Sending to 198.65.166.131 : 5060 (NAT) Using INVITE request as basis request - 150389463@63.80.235.211 Found peer 'gizmophone' Found RTP audio format 0 Found RTP audio format 101 Peer audio RTP is at port 63.80.235.211:20600 Found description format PCMU for ID 0 Found description format telephone-event for ID 101 Capabilities: us - 0x40e (gsm|ulaw|alaw|ilbc), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event) Peer audio RTP is at port 63.80.235.211:20600 Looking for gizmoguy in fromgizmo (domain XXX.XXX.XXX.XXX) list_route: hop: <--- Transmitting (NAT) to 198.65.166.131:5060 ---> SIP/2.0 100 Trying Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bKc287.ae1c27a3.0;received=198.65.166.131 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK634373567 From: ;tag=1111285111 To: Call-ID: 150389463@63.80.235.211 CSeq: 6168 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Length: 0 <------------> -- Executing [gizmoguy@fromgizmo:1] Set("SIP/XXXXXXXXXXX-081e1078", "CALLERID(all)=From AZ Number ") in new stack -- Executing [gizmoguy@fromgizmo:2] Answer("SIP/XXXXXXXXXXX-081e1078", "") in new stack Audio is at XXX.XXX.XXX.XXX port 19672 Adding codec 0x4 (ulaw) to SDP Adding non-codec 0x1 (telephone-event) to SDP Itchy*CLI> <--- Reliably Transmitting (NAT) to 198.65.166.131:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bKc287.ae1c27a3.0;received=198.65.166.131 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK634373567 Record-Route: From: ;tag=1111285111 To: ;tag=as07456761 Call-ID: 150389463@63.80.235.211 CSeq: 6168 INVITE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Type: application/sdp Content-Length: 228 v=0 o=root 31186 31186 IN IP4 XXX.XXX.XXX.XXX s=session c=IN IP4 XXX.XXX.XXX.XXX t=0 0 m=audio 19672 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=sendrecv <------------> -- Executing [gizmoguy@fromgizmo:3] Wait("SIP/XXXXXXXXXXX-081e1078", "1") in new stack Itchy*CLI> <--- SIP read from 198.65.166.131:5060 ---> ACK sip:gizmoguy@XXX.XXX.XXX.XXX:5060 SIP/2.0 Record-Route: Via: SIP/2.0/UDP 198.65.166.131;branch=0 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK1367767871 From: ;tag=1111285111 To: ;tag=as07456761 Call-ID: 150389463@63.80.235.211 CSeq: 6168 ACK Max-Forwards: 16 Contact: User-Agent: YATE/1.2.0 Content-Length: 0 P-hint: rr-enforced <-------------> --- (13 headers 0 lines) --- -- Executing [gizmoguy@fromgizmo:4] SendDTMF("SIP/XXXXXXXXXXX-081e1078", "1") in new stack set_destination: Parsing for address/port to send to set_destination: set destination to 198.65.166.131, port 5060 Reliably Transmitting (NAT) to 198.65.166.131:5060: INFO sip:XXXXXXXXXX@63.80.235.211:5061 SIP/2.0 Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK4ac39bc8;rport Route: From: ;tag=as07456761 To: ;tag=1111285111 Contact: Call-ID: 150389463@63.80.235.211 CSeq: 102 INFO User-Agent: Asterisk PBX Max-Forwards: 70 Content-Type: application/dtmf-relay Content-Length: 24 Signal=1 Duration=250 --- Itchy*CLI> <--- SIP read from 198.65.166.131:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP XXX.XXX.XXX.XXX:5060;branch=z9hG4bK4ac39bc8;rport=5060 Record-Route: From: ;tag=as07456761 To: ;tag=1111285111 Call-ID: 150389463@63.80.235.211 CSeq: 102 INFO Server: YATE/1.2.0 Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO Content-Length: 0 <-------------> --- (10 headers 0 lines) --- SIP Response message for INCOMING dialog INFO arrived -- Executing [gizmoguy@fromgizmo:5] Dial("SIP/XXXXXXXXXXX-081e1078", "SIP/101&SIP/102&SIP/103&SIP/104") in new stack Really destroying SIP dialog '583a25980e3a4e211314e85a7c5c9371@127.0.1.1' Method: INVITE [Oct 18 07:35:55] WARNING[10596]: app_dial.c:1081 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) Really destroying SIP dialog '785d42116fae55d234fa3841172a4d45@127.0.1.1' Method: INVITE [Oct 18 07:35:55] WARNING[10596]: app_dial.c:1081 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) Audio is at 10.4.20.111 port 19592 Adding codec 0x4 (ulaw) to SDP Adding codec 0x8 (alaw) to SDP Adding codec 0x2 (gsm) to SDP Adding codec 0x400 (ilbc) to SDP Adding non-codec 0x1 (telephone-event) to SDP Reliably Transmitting (NAT) to 10.4.20.190:5060: INVITE sip:103@10.4.20.190:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK25caf26d;rport From: "From AZ Number" ;tag=as618b585e To: Contact: Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 CSeq: 102 INVITE User-Agent: Asterisk PBX Max-Forwards: 70 Date: Thu, 18 Oct 2007 14:35:55 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Type: application/sdp Content-Length: 318 v=0 o=root 31186 31186 IN IP4 10.4.20.111 s=session c=IN IP4 10.4.20.111 t=0 0 m=audio 19592 RTP/AVP 0 8 3 97 101 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:3 GSM/8000 a=rtpmap:97 iLBC/8000 a=fmtp:97 mode=30 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=silenceSupp:off - - - - a=sendrecv --- -- Called 103 Really destroying SIP dialog '47f4809462d24a3f5360151869b9eeac@127.0.1.1' Method: INVITE [Oct 18 07:35:55] WARNING[10596]: app_dial.c:1081 dial_exec_full: Unable to create channel of type 'SIP' (cause 3 - No route to destination) Itchy*CLI> <--- SIP read from 10.4.20.190:5060 ---> SIP/2.0 100 Trying Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 From: "From AZ Number";tag=as618b585e To: ;tag=3f194-9fa7a352 CSeq: 102 INVITE Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK25caf26d;rport Contact: Cordless Server: DTA SIP/0.12.35 DNLD/1.1.13 Content-Length: 0 <-------------> --- (9 headers 0 lines) --- Itchy*CLI> <--- SIP read from 10.4.20.190:5060 ---> SIP/2.0 180 Ringing Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 From: "From AZ Number";tag=as618b585e To: ;tag=3f194-9fa7a352 CSeq: 102 INVITE Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK25caf26d;rport Contact: Cordless Server: DTA SIP/0.12.35 DNLD/1.1.13 Content-Length: 0 <-------------> --- (9 headers 0 lines) --- -- SIP/103-081d9ea0 is ringing Really destroying SIP dialog '6a8b89cb27b9cbf52e8b114418c26b2d@127.0.1.1' Method: REGISTER Really destroying SIP dialog '437de217558dfe9452b918a5756584bd@127.0.1.1' Method: REGISTER Itchy*CLI> <--- SIP read from 10.4.20.190:5060 ---> SIP/2.0 200 OK Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 From: "From AZ Number";tag=as618b585e To: ;tag=3f194-9fa7a352 CSeq: 102 INVITE Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK25caf26d;rport Contact: Cordless Supported: timer,100rel Allow: REFER,UPDATE,INFO,MESSAGE,OPTIONS,PRACK Server: DTA SIP/0.12.35 DNLD/1.1.13 Content-Type: application/sdp Content-Length: 132 v=0 o=103 0 0 IN IP4 10.4.20.190 s=- c=IN IP4 10.4.20.190 t=0 0 m=audio 8190 RTP/AVP 0 101 a=rtpmap:101 telephone-event/8000 <-------------> --- (12 headers 7 lines) --- Found RTP audio format 0 Found RTP audio format 101 Peer audio RTP is at port 10.4.20.190:8190 Found description format telephone-event for ID 101 Capabilities: us - 0x40e (gsm|ulaw|alaw|ilbc), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw) Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event) Peer audio RTP is at port 10.4.20.190:8190 list_route: hop: set_destination: Parsing for address/port to send to set_destination: set destination to 10.4.20.190, port 5060 Transmitting (NAT) to 10.4.20.190:5060: ACK sip:103@10.4.20.190:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK1231da7f;rport From: "From AZ Number" ;tag=as618b585e To: ;tag=3f194-9fa7a352 Contact: Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 CSeq: 102 ACK User-Agent: Asterisk PBX Max-Forwards: 70 Content-Length: 0 --- -- SIP/103-081d9ea0 answered SIP/XXXXXXXXXXX-081e1078 -- Packet2Packet bridging SIP/XXXXXXXXXXX-081e1078 and SIP/103-081d9ea0 Itchy*CLI> <--- SIP read from 10.4.20.190:5060 ---> H <-------------> --- (1 headers 0 lines) --- Itchy*CLI> <--- SIP read from 198.65.166.131:5060 ---> BYE sip:gizmoguy@XXX.XXX.XXX.XXX:5060 SIP/2.0 Record-Route: Call-ID: 150389463@63.80.235.211 From: ;tag=1111285111 To: ;tag=as07456761 Reason: SIP;text="IVR" Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK2097.28d3a433.0 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK2121699409 CSeq: 6173 BYE User-Agent: YATE/1.2.0 Max-Forwards: 16 Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO Content-Length: 0 RemoteIP: 63.80.235.211 P-hint: rr-enforced <-------------> --- (15 headers 0 lines) --- Sending to 198.65.166.131 : 5060 (NAT) <--- Transmitting (NAT) to 198.65.166.131:5060 ---> SIP/2.0 200 OK Via: SIP/2.0/UDP 198.65.166.131;branch=z9hG4bK2097.28d3a433.0;received=198.65.166.131 Via: SIP/2.0/UDP 63.80.235.211:5061;rport=5061;branch=z9hG4bK2121699409 Record-Route: From: ;tag=1111285111 To: ;tag=as07456761 Call-ID: 150389463@63.80.235.211 CSeq: 6173 BYE User-Agent: Asterisk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Contact: Content-Length: 0 <------------> Scheduling destruction of SIP dialog '1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111' in 32000 ms (Method: INVITE) set_destination: Parsing for address/port to send to set_destination: set destination to 10.4.20.190, port 5060 Reliably Transmitting (NAT) to 10.4.20.190:5060: BYE sip:103@10.4.20.190:5060;user=phone SIP/2.0 Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK53a33c6f;rport From: "From AZ Number" ;tag=as618b585e To: ;tag=3f194-9fa7a352 Contact: Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 CSeq: 103 BYE User-Agent: Asterisk PBX Max-Forwards: 70 Content-Length: 0 --- == Spawn extension (fromgizmo, gizmoguy, 5) exited non-zero on 'SIP/XXXXXXXXXXX-081e1078' Really destroying SIP dialog '150389463@63.80.235.211' Method: BYE Itchy*CLI> <--- SIP read from 10.4.20.190:5060 ---> SIP/2.0 200 OK Call-ID: 1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111 From: "From AZ Number";tag=as618b585e To: ;tag=3f194-9fa7a352 CSeq: 103 BYE Via: SIP/2.0/UDP 10.4.20.111:5060;branch=z9hG4bK53a33c6f;rport Contact: Cordless Server: DTA SIP/0.12.35 DNLD/1.1.13 Content-Length: 0 <-------------> --- (9 headers 0 lines) --- Really destroying SIP dialog '1e174c353d7b9ef87163a8ec572edd2b@10.4.20.111' Method: INVITE