Inbound calls to Cisco CME not working, Malformed

Hey all, I know that others have run into this, but nothing seems to have been fixed.

I am trying to call a phone off an FXS port on a Cisco router running CME. I can make calls from the Cisco router to asterisk fine, but when I try to call inbound, it’s not working.

This is what I get:
<— SIP read from UDP:192.1.1.1:5060 —>
SIP/2.0 400 Bad Request - 'Malformed/Missing URL’
Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK69f95e88
From: “home” sip:1212@192.1.1.130;tag=as05730b87
To: sip:192.1.1.1:5060;tag=6041670-263C
Date: Sat, 03 Mar 2012 19:33:21 GMT
Call-ID: 6acb2a3967d9e8c524fb7925710bfcad@192.1.1.130:5060
CSeq: 102 INVITE
Allow-Events: telephone-event
Reason: Q.850;cause=100
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0

<------------->
— (11 headers 0 lines) —
– Got SIP response 400 “Bad Request - ‘Malformed/Missing URL’” back from 192.1.1.1:5060
Transmitting (no NAT) to 192.1.1.1:5060:
ACK sip:192.1.1.1:5060 SIP/2.0
Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK69f95e88
Max-Forwards: 70
From: “home” sip:1212@192.1.1.130;tag=as05730b87
To: sip:192.1.1.1:5060;tag=6041670-263C
Contact: sip:1212@192.1.1.130:5060
Call-ID: 6acb2a3967d9e8c524fb7925710bfcad@192.1.1.130:5060
CSeq: 102 ACK
User-Agent: FPBX-2.10.0(1.8.7.1)
Content-Length: 0

Why is Asterisk passing a bad “To:” header? and only to the Cisco CME? I have NAT turned off and qualify set to no.

any help is appreciated! Been pulling my hair out for days trying to finger this out…

It’s not invalid, and you haven’t demonstrated that it is sending it:

[quote=“RFC 3261”]To = ( “To” / “t” ) HCOLON ( name-addr
/ addr-spec ) *( SEMI to-param )

SIP-URI / SIPS-URI / absoluteURI

SIP-URI = “sip:” [ userinfo ] hostport
uri-parameters [ headers ]

hostport = host [ “:” port ]

host = hostname / IPv4address / IPv6reference

IPv4address = 13DIGIT “.” 13DIGIT “.” 13DIGIT “.” 13DIGIT

port = 1*DIGIT

to-param = tag-param / generic-param

tag-param = “tag” EQUAL token

token = 1*(alphanum / “-” / “.” / “!” / “%” / “*”
/ “_” / “+” / “`” / “’” / “~” )
[/quote]

@David55… So are you offering a solution to the problem? The output is from the asterisk debug.
Any solutions (or hacks to make it work) anyone?

Provide a trace including the alleged invalid output. Read the documentation for what the Cisco wants - this is probably a result of the Cisco requiring something more restricted than the general case. Provide the dialplan fragment that is causing the problem. I suspect your alleged error is that the user field is missing, in which case you need to provide it in the dial string.

The front end that I’m using is freepbx. I have the extension 6969 in there. It seems like there is something specific that asterisk is seeing from the Cisco CME that is causing asterisk to send these messages with an invalid “To:” field. How would I hack the asterisk software to get it to send the correct information to this particular device. Not a whole lot I can do on the Cisco end, because it is receiving the message and I don’t think I could configure the Cisco CME to modify the sip messages coming from asterisk.

There have been enough users via google search that have run into this issue to say that there is a problem here. I want to fix it primarily for myself and for future users that will likely run into this problem.

I repeat: It is not invalid. Tell me what the Cisco needs to see (also tell me what was actually sent in the INVITE, not just the response to that and ACK), and I may be able to tell you how to do it using Asterisk itself. You will probably need support from a FreePBX forum to find out how to translate that into FreePBX configuration.

I guess my additional post didn’t go through… Here is when I’m dialing from a sip phone to an extension in the Cisco CME. Below that is some debug showing a successful call from a sip phone to another sip phone on the same asterisk server:

asterisk debug sip phone 1212 calling extension 6969 on the Cisco CME:

pbx*CLI> sip show peers

pbx*CLI>
Name/username Host Dyn Forcerport ACL Port Status
1 (Unspecified) D N A 0 UNKNOWN
1111/1111 192.1.1.208 D N A 5060 OK (148 ms)
1212/1212 192.1.1.8 D A 5060 Unmonitored
6969 192.1.1.1 A 5060 Unmonitored
homeltov/3140804 216.152.133.106 N 5060 OK (63 ms)
link2voip/shloppy 64.34.96.201 N 5060 OK (66 ms)
6 sip peers [Monitored: 3 online, 1 offline Unmonitored: 2 online, 0 offline]

pbx*CLI> sip set debug ip 192.1.1.1

pbx*CLI>
SIP Debugging Enabled for IP: 192.1.1.1

pbx*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5

pbx*CLI>
– Executing [6969@from-internal:1] Set(“SIP/1212-0000001e”, “__RINGTIMER=15”) in new stack

pbx*CLI>
– Executing [6969@from-internal:2] Macro(“SIP/1212-0000001e”, “exten-vm,novm,6969,0,0,0”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:1] Macro(“SIP/1212-0000001e”, “user-callerid,”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:1] Set(“SIP/1212-0000001e”, “AMPUSER=1212”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/1212-0000001e”, “0?report”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/1212-0000001e”, “1?Set(REALCALLERIDNUM=1212)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:4] Set(“SIP/1212-0000001e”, “AMPUSER=1212”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:5] Set(“SIP/1212-0000001e”, “AMPUSERCIDNAME=home”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/1212-0000001e”, “0?report”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:7] Set(“SIP/1212-0000001e”, “AMPUSERCID=1212”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:8] Set(“SIP/1212-0000001e”, “CALLERID(all)=“home” <1212>”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/1212-0000001e”, “0?limit”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/1212-0000001e”, “0?Set(GROUP(concurrency_limit)=1212)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:11] GosubIf(“SIP/1212-0000001e”, “7?sub-ccss,s,1(macro-exten-vm,6969)”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:1] ExecIf(“SIP/1212-0000001e”, “0?Return()”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:2] Set(“SIP/1212-0000001e”, “CCSS_SETUP=TRUE”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:3] GosubIf(“SIP/1212-0000001e”, “7?monitor_config,1(macro-exten-vm,6969):monitor_default,1(macro-exten-vm,6969)”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:1] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_monitor_policy)=generic”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:2] GotoIf(“SIP/1212-0000001e”, “1?set_monitor”) in new stack

pbx*CLI>
– Goto (sub-ccss,monitor_config,5)

pbx*CLI>
– Executing [monitor_config@sub-ccss:5] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_max_monitors)=”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:6] Return(“SIP/1212-0000001e”, “TRUE”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:4] GosubIf(“SIP/1212-0000001e”, “7?agent_config,1():agent_default,1()”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:1] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_agent_policy)=generic”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:2] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_offer_timer)=30”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:3] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(ccbs_available_timer)=4800”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:4] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(ccnr_available_timer)=7200”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:5] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_callback_macro)=ccss-default”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:6] ExecIf(“SIP/1212-0000001e”, “1?Set(CALLCOMPLETION(cc_recall_timer)=15)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:7] ExecIf(“SIP/1212-0000001e”, “1?Set(CALLCOMPLETION(cc_max_agents)=5)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:8] ExecIf(“SIP/1212-0000001e”, “1?Set(CALLCOMPLETION(cc_agent_dialstring)=Local/1212_6969@from-ccss-extension)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:9] Set(“SIP/1212-0000001e”, “CALLCOMPLETION(cc_callback_macro)=ccss-default”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:10] Return(“SIP/1212-0000001e”, “”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:5] Set(“SIP/1212-0000001e”, “DB(AMPUSER/1212/ccss/last_number)=6969”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:6] Return(“SIP/1212-0000001e”, “”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/1212-0000001e”, “0?Set(CHANNEL(language)=)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/1212-0000001e”, “0?continue”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:14] Set(“SIP/1212-0000001e”, “__TTL=64”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:15] GotoIf(“SIP/1212-0000001e”, “1?continue”) in new stack

pbx*CLI>
– Goto (macro-user-callerid,s,26)

pbx*CLI>
– Executing [s@macro-user-callerid:26] Set(“SIP/1212-0000001e”, “CALLERID(number)=1212”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:27] Set(“SIP/1212-0000001e”, “CALLERID(name)=home”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:28] Set(“SIP/1212-0000001e”, “CHANNEL(language)=en”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:2] Set(“SIP/1212-0000001e”, “RingGroupMethod=none”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:3] Set(“SIP/1212-0000001e”, “__EXTTOCALL=6969”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:4] Set(“SIP/1212-0000001e”, “__PICKUPMARK=6969”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:5] Set(“SIP/1212-0000001e”, “RT=”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:6] Gosub(“SIP/1212-0000001e”, “sub-record-check,s,1(exten,6969,)”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:1] GotoIf(“SIP/1212-0000001e”, “1?check”) in new stack

pbx*CLI>
– Goto (sub-record-check,s,3)

pbx*CLI>
– Executing [s@sub-record-check:3] Set(“SIP/1212-0000001e”, “MON_FMT=wav”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:4] GotoIf(“SIP/1212-0000001e”, “1?next”) in new stack

pbx*CLI>
– Goto (sub-record-check,s,7)

pbx*CLI>
– Executing [s@sub-record-check:7] ExecIf(“SIP/1212-0000001e”, “0?Return()”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:8] GotoIf(“SIP/1212-0000001e”, “0?exten,1”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:9] Set(“SIP/1212-0000001e”, “__REC_STATUS=INITIALIZED”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:10] ExecIf(“SIP/1212-0000001e”, “0?Set(__REC_POLICY_MODE=)”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:11] Set(“SIP/1212-0000001e”, “NOW=1330978098”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:12] Set(“SIP/1212-0000001e”, “__DAY=05”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:13] Set(“SIP/1212-0000001e”, “__MONTH=03”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:14] Set(“SIP/1212-0000001e”, “__YEAR=2012”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:15] Set(“SIP/1212-0000001e”, “__TIMESTR=20120305-120818”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:16] Set(“SIP/1212-0000001e”, “__FROMEXTEN=1212”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:17] Set(“SIP/1212-0000001e”, “__CALLFILENAME=exten-6969-1212-20120305-120818-1330978097.30”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:18] Goto(“SIP/1212-0000001e”, “exten,1”) in new stack

pbx*CLI>
– Goto (sub-record-check,exten,1)

pbx*CLI>
– Executing [exten@sub-record-check:1] GotoIf(“SIP/1212-0000001e”, “0?callee”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:2] Set(“SIP/1212-0000001e”, “__REC_POLICY_MODE=dontcare”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:3] GotoIf(“SIP/1212-0000001e”, “1?caller”) in new stack

pbx*CLI>
– Goto (sub-record-check,exten,10)

pbx*CLI>
– Executing [exten@sub-record-check:10] Set(“SIP/1212-0000001e”, “REC_POLICY_MODE=dontcare”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:11] GosubIf(“SIP/1212-0000001e”, “0?record,1(exten,6969,1212)”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:12] Return(“SIP/1212-0000001e”, “”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:7] GotoIf(“SIP/1212-0000001e”, “1?macrodial”) in new stack

pbx*CLI>
– Goto (macro-exten-vm,s,13)

pbx*CLI>
– Executing [s@macro-exten-vm:13] GosubIf(“SIP/1212-0000001e”, “0?clrheader,1()”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:14] Macro(“SIP/1212-0000001e”, “dial-one,tr,6969”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:1] Set(“SIP/1212-0000001e”, “DEXTEN=6969”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:2] Set(“SIP/1212-0000001e”, “DIALSTATUS_CW=”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:3] GosubIf(“SIP/1212-0000001e”, “0?screen,1()”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:4] GosubIf(“SIP/1212-0000001e”, “0?cf,1()”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:5] GotoIf(“SIP/1212-0000001e”, “1?skip1”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,8)

pbx*CLI>
– Executing [s@macro-dial-one:8] GotoIf(“SIP/1212-0000001e”, “0?nodial”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:9] GotoIf(“SIP/1212-0000001e”, “0?continue”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:10] Set(“SIP/1212-0000001e”, “EXTHASCW=ENABLED”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:11] GotoIf(“SIP/1212-0000001e”, “0?next1:cwinusebusy”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,23)

pbx*CLI>
– Executing [s@macro-dial-one:23] GotoIf(“SIP/1212-0000001e”, “1?next3:continue”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,24)

pbx*CLI>
– Executing [s@macro-dial-one:24] ExecIf(“SIP/1212-0000001e”, “0?Set(DIALSTATUS_CW=BUSY)”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:25] GotoIf(“SIP/1212-0000001e”, “0?nodial”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:26] GosubIf(“SIP/1212-0000001e”, “1?dstring,1():dlocal,1()”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:1] Set(“SIP/1212-0000001e”, “DSTRING=”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:2] Set(“SIP/1212-0000001e”, “DEVICES=6969”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:3] ExecIf(“SIP/1212-0000001e”, “0?Return()”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:4] ExecIf(“SIP/1212-0000001e”, “0?Set(DEVICES=969)”) in new stack
– Executing [dstring@macro-dial-one:5] Set(“SIP/1212-0000001e”, “LOOPCNT=1”) in new stack
– Executing [dstring@macro-dial-one:6] Set(“SIP/1212-0000001e”, “ITER=1”) in new stack
– Executing [dstring@macro-dial-one:7] Set(“SIP/1212-0000001e”, “THISDIAL=SIP/6969”) in new stack
– Executing [dstring@macro-dial-one:8] GosubIf(“SIP/1212-0000001e”, “1?zap2dahdi,1()”) in new stack
– Executing [zap2dahdi@macro-dial-one:1] ExecIf(“SIP/1212-0000001e”, “0?Return()”) in new stack
– Executing [zap2dahdi@macro-dial-one:2] Set(“SIP/1212-0000001e”, “NEWDIAL=”) in new stack
– Executing [zap2dahdi@macro-dial-one:3] Set(“SIP/1212-0000001e”, “LOOPCNT2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:4] Set(“SIP/1212-0000001e”, “ITER2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:5] Set(“SIP/1212-0000001e”, “THISPART2=SIP/6969”) in new stack
– Executing [zap2dahdi@macro-dial-one:6] ExecIf(“SIP/1212-0000001e”, “0?Set(THISPART2=DAHDI/6969)”) in new stack
– Executing [zap2dahdi@macro-dial-one:7] Set(“SIP/1212-0000001e”, “NEWDIAL=SIP/6969&”) in new stack
– Executing [zap2dahdi@macro-dial-one:8] Set(“SIP/1212-0000001e”, “ITER2=2”) in new stack
– Executing [zap2dahdi@macro-dial-one:9] GotoIf(“SIP/1212-0000001e”, “0?begin2”) in new stack
– Executing [zap2dahdi@macro-dial-one:10] Set(“SIP/1212-0000001e”, “THISDIAL=SIP/6969”) in new stack
– Executing [zap2dahdi@macro-dial-one:11] Return(“SIP/1212-0000001e”, “”) in new stack
– Executing [dstring@macro-dial-one:9] Set(“SIP/1212-0000001e”, “DSTRING=SIP/6969&”) in new stack
– Executing [dstring@macro-dial-one:10] Set(“SIP/1212-0000001e”, “ITER=2”) in new stack
– Executing [dstring@macro-dial-one:11] GotoIf(“SIP/1212-0000001e”, “0?begin”) in new stack
– Executing [dstring@macro-dial-one:12] Set(“SIP/1212-0000001e”, “DSTRING=SIP/6969”) in new stack
– Executing [dstring@macro-dial-one:13] Return(“SIP/1212-0000001e”, “”) in new stack
– Executing [s@macro-dial-one:27] GotoIf(“SIP/1212-0000001e”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:28] GotoIf(“SIP/1212-0000001e”, “0?skiptrace”) in new stack
– Executing [s@macro-dial-one:29] GosubIf(“SIP/1212-0000001e”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [ctset@macro-dial-one:1] Set(“SIP/1212-0000001e”, “DB(CALLTRACE/6969)=1212”) in new stack
– Executing [ctset@macro-dial-one:2] Return(“SIP/1212-0000001e”, “”) in new stack
– Executing [s@macro-dial-one:30] Set(“SIP/1212-0000001e”, “D_OPTIONS=tr”) in new stack
– Executing [s@macro-dial-one:31] ExecIf(“SIP/1212-0000001e”, “0?SIPAddHeader(Alert-Info: )”) in new stack
– Executing [s@macro-dial-one:32] ExecIf(“SIP/1212-0000001e”, “0?SIPAddHeader()”) in new stack
– Executing [s@macro-dial-one:33] ExecIf(“SIP/1212-0000001e”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [s@macro-dial-one:34] GosubIf(“SIP/1212-0000001e”, “0?qwait,1()”) in new stack
– Executing [s@macro-dial-one:35] Set(“SIP/1212-0000001e”, “__CWIGNORE=”) in new stack
– Executing [s@macro-dial-one:36] Set(“SIP/1212-0000001e”, “__KEEPCID=TRUE”) in new stack
– Executing [s@macro-dial-one:37] GotoIf(“SIP/1212-0000001e”, “0?usegoto,1”) in new stack
– Executing [s@macro-dial-one:38] GotoIf(“SIP/1212-0000001e”, “0?godial”) in new stack
– Executing [s@macro-dial-one:39] Set(“SIP/1212-0000001e”, “CONNECTEDLINE(name,i)=homephone”) in new stack
– Executing [s@macro-dial-one:40] Set(“SIP/1212-0000001e”, “CONNECTEDLINE(num)=6969”) in new stack
– Executing [s@macro-dial-one:41] Set(“SIP/1212-0000001e”, “D_OPTIONS=trI”) in new stack
– Executing [s@macro-dial-one:42] Dial(“SIP/1212-0000001e”, “SIP/6969,trI”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.1.1.1:5060:
INVITE sip:192.1.1.1:5060 SIP/2.0

Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK56230100

Max-Forwards: 70

From: “home” sip:1212@192.1.1.130;tag=as30635951

To: sip:192.1.1.1:5060

Contact: sip:1212@192.1.1.130:5060

Call-ID: 79f9ead37ecde8246173174671aed76c@192.1.1.130:5060

CSeq: 102 INVITE

User-Agent: FPBX-2.10.0(1.8.7.1)

Date: Mon, 05 Mar 2012 20:08:18 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Type: application/sdp

Content-Length: 281

v=0

o=root 1381642981 1381642981 IN IP4 192.1.1.130

s=Asterisk PBX 1.8.7.1

c=IN IP4 192.1.1.130

t=0 0

m=audio 12724 RTP/AVP 0 8 3 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:3 GSM/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

a=sendrecv


-- Called SIP/6969
-- Connected line update to SIP/1212-0000001e prevented.

pbx*CLI>

<— SIP read from UDP:192.1.1.1:5060 —>
SIP/2.0 400 Bad Request - 'Malformed/Missing URL’
Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK56230100
From: “home” sip:1212@192.1.1.130;tag=as30635951
To: sip:192.1.1.1:5060;tag=E3B25BD-1482
Date: Mon, 05 Mar 2012 09:50:27 GMT
Call-ID: 79f9ead37ecde8246173174671aed76c@192.1.1.130:5060
CSeq: 102 INVITE
Allow-Events: telephone-event
Reason: Q.850;cause=100
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0

<------------->

pbx*CLI>
— (11 headers 0 lines) —

pbx*CLI>
– Got SIP response 400 “Bad Request - ‘Malformed/Missing URL’” back from 192.1.1.1:5060

pbx*CLI>
Transmitting (no NAT) to 192.1.1.1:5060:
ACK sip:192.1.1.1:5060 SIP/2.0

Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK56230100

Max-Forwards: 70

From: “home” sip:1212@192.1.1.130;tag=as30635951

To: sip:192.1.1.1:5060;tag=E3B25BD-1482

Contact: sip:1212@192.1.1.130:5060

Call-ID: 79f9ead37ecde8246173174671aed76c@192.1.1.130:5060

CSeq: 102 ACK

User-Agent: FPBX-2.10.0(1.8.7.1)

Content-Length: 0


pbx*CLI>
– SIP/6969-0000001f is circuit-busy

pbx*CLI>
== Everyone is busy/congested at this time (1:0/1/0)

pbx*CLI>
– Executing [s@macro-dial-one:43] ExecIf(“SIP/1212-0000001e”, “0?Set(DIALSTATUS=)”) in new stack
– Executing [s@macro-dial-one:44] GosubIf(“SIP/1212-0000001e”, “0?s-CONGESTION,1()”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:45] MacroExit(“SIP/1212-0000001e”, “”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:15] Set(“SIP/1212-0000001e”, “SV_DIALSTATUS=CONGESTION”) in new stack
– Executing [s@macro-exten-vm:16] GosubIf(“SIP/1212-0000001e”, “0?docfu,1()”) in new stack
– Executing [s@macro-exten-vm:17] GosubIf(“SIP/1212-0000001e”, “0?docfb,1()”) in new stack
– Executing [s@macro-exten-vm:18] Set(“SIP/1212-0000001e”, “DIALSTATUS=CONGESTION”) in new stack
– Executing [s@macro-exten-vm:19] ExecIf(“SIP/1212-0000001e”, “0?MacroExit()”) in new stack
– Executing [s@macro-exten-vm:20] GotoIf(“SIP/1212-0000001e”, “1?s-CONGESTION,1”) in new stack
– Goto (macro-exten-vm,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-exten-vm:1] GotoIf(“SIP/1212-0000001e”, “0?exit,1”) in new stack
– Executing [s-CONGESTION@macro-exten-vm:2] PlayTones(“SIP/1212-0000001e”, “congestion”) in new stack
– Executing [s-CONGESTION@macro-exten-vm:3] Congestion(“SIP/1212-0000001e”, “10”) in new stack
Really destroying SIP dialog ‘79f9ead37ecde8246173174671aed76c@192.1.1.130:5060’ Method: INVITE
== Spawn extension (macro-exten-vm, s-CONGESTION, 3) exited non-zero on ‘SIP/1212-0000001e’ in macro ‘exten-vm’
== Spawn extension (from-internal, 6969, 2) exited non-zero on ‘SIP/1212-0000001e’
– Executing [h@from-internal:1] Macro(“SIP/1212-0000001e”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/1212-0000001e”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [s@macro-hangupcall:3] Hangup(“SIP/1212-0000001e”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/1212-0000001e’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1212-0000001e’

pbx*CLI>

pbx*CLI>

pbx*CLI>

pbx*CLI>

pbx*CLI> sip set debug off

Here is a successful call from extension 1111(sip) to 1212(sip) on the same asterisk server:
pbx*CLI>
SIP Debugging Enabled for IP: 192.1.1.8

pbx*CLI>

<— SIP read from UDP:192.1.1.8:49173 —>
REGISTER sip:192.1.1.130 SIP/2.0
Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKbe68cf31
From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29
To: sip:1212@192.1.1.130
Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8
Max-Forwards: 70
Date: Mon, 05 Mar 2012 GMT
CSeq: 8202 REGISTER
User-Agent: Cisco-CP7970G/8.0
Contact: sip:1212@192.1.1.8:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-0013c4495b7a”;+u.sip!model.ccm.cisco.com="30006"
Content-Length: 0
Expires: 30

<------------->

pbx*CLI>
— (12 headers 0 lines) —
Sending to 192.1.1.8:49173 (NAT)

<— Transmitting (no NAT) to 192.1.1.8:5060 —>
SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKbe68cf31;received=192.1.1.8

From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29

To: sip:1212@192.1.1.130

Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8

CSeq: 8202 REGISTER

Server: FPBX-2.10.0(1.8.7.1)

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Length: 0

<------------>

pbx*CLI>

<— Transmitting (no NAT) to 192.1.1.8:5060 —>
SIP/2.0 401 Unauthorized

Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKbe68cf31;received=192.1.1.8

From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29

To: sip:1212@192.1.1.130;tag=as55b56f9f

Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8

CSeq: 8202 REGISTER

Server: FPBX-2.10.0(1.8.7.1)

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“66ef1a91”

Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8’ in 32000 ms (Method: REGISTER)

pbx*CLI>

<— SIP read from UDP:192.1.1.8:49174 —>
REGISTER sip:192.1.1.130 SIP/2.0
Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKcce65f7b
From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29
To: sip:1212@192.1.1.130
Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8
Max-Forwards: 70
Date: Mon, 05 Mar 2012 GMT
CSeq: 8203 REGISTER
User-Agent: Cisco-CP7970G/8.0
Contact: sip:1212@192.1.1.8:5060;transport=udp;+sip.instance=“urn:uuid:00000000-0000-0000-0000-0013c4495b7a”;+u.sip!model.ccm.cisco.com="30006"
Authorization: Digest username=“1212”,realm=“asterisk”,uri=“sip:192.1.1.130”,response=“208582ef8bdb5b5afbdba23bd7baf011”,nonce=“66ef1a91”,algorithm=MD5
Content-Length: 0
Expires: 30

<------------->

pbx*CLI>
— (13 headers 0 lines) —
Sending to 192.1.1.8:5060 (no NAT)

<— Transmitting (no NAT) to 192.1.1.8:5060 —>
SIP/2.0 100 Trying

Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKcce65f7b;received=192.1.1.8

From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29

To: sip:1212@192.1.1.130

Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8

CSeq: 8203 REGISTER

Server: FPBX-2.10.0(1.8.7.1)

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Length: 0

<------------>
– Registered SIP ‘1212’ at 192.1.1.8:5060

<— Transmitting (no NAT) to 192.1.1.8:5060 —>
SIP/2.0 200 OK

Via: SIP/2.0/UDP 192.1.1.8:5060;branch=z9hG4bKcce65f7b;received=192.1.1.8

From: sip:1212@192.1.1.130;tag=0013c4495b7a0fe582e0abe3-05632c29

To: sip:1212@192.1.1.130;tag=as55b56f9f

Call-ID: 0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8

CSeq: 8203 REGISTER

Server: FPBX-2.10.0(1.8.7.1)

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Expires: 60

Contact: sip:1212@192.1.1.8:5060;transport=udp;expires=60

Date: Mon, 05 Mar 2012 20:08:44 GMT

Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘0013c449-5b7a0002-ba128f11-0d59b6e5@192.1.1.8’ in 32000 ms (Method: REGISTER)

pbx*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5

pbx*CLI>
– Executing [1212@from-internal:1] Set(“SIP/1111-00000020”, “__RINGTIMER=15”) in new stack

pbx*CLI>
– Executing [1212@from-internal:2] Macro(“SIP/1111-00000020”, “exten-vm,1212,1212,0,0,0”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:1] Macro(“SIP/1111-00000020”, “user-callerid,”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:1] Set(“SIP/1111-00000020”, “AMPUSER=1111”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/1111-00000020”, “0?report”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/1111-00000020”, “1?Set(REALCALLERIDNUM=1111)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:4] Set(“SIP/1111-00000020”, “AMPUSER=1111”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:5] Set(“SIP/1111-00000020”, “AMPUSERCIDNAME=shlappy”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/1111-00000020”, “0?report”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:7] Set(“SIP/1111-00000020”, “AMPUSERCID=1111”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:8] Set(“SIP/1111-00000020”, “CALLERID(all)=“shlappy” <1111>”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/1111-00000020”, “0?limit”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/1111-00000020”, “0?Set(GROUP(concurrency_limit)=1111)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:11] GosubIf(“SIP/1111-00000020”, “7?sub-ccss,s,1(macro-exten-vm,1212)”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:1] ExecIf(“SIP/1111-00000020”, “0?Return()”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:2] Set(“SIP/1111-00000020”, “CCSS_SETUP=TRUE”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:3] GosubIf(“SIP/1111-00000020”, “7?monitor_config,1(macro-exten-vm,1212):monitor_default,1(macro-exten-vm,1212)”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:1] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_monitor_policy)=generic”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:2] GotoIf(“SIP/1111-00000020”, “1?set_monitor”) in new stack

pbx*CLI>
– Goto (sub-ccss,monitor_config,5)

pbx*CLI>
– Executing [monitor_config@sub-ccss:5] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_max_monitors)=”) in new stack

pbx*CLI>
– Executing [monitor_config@sub-ccss:6] Return(“SIP/1111-00000020”, “TRUE”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:4] GosubIf(“SIP/1111-00000020”, “7?agent_config,1():agent_default,1()”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:1] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_agent_policy)=generic”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:2] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_offer_timer)=30”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:3] Set(“SIP/1111-00000020”, “CALLCOMPLETION(ccbs_available_timer)=4800”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:4] Set(“SIP/1111-00000020”, “CALLCOMPLETION(ccnr_available_timer)=7200”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:5] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_callback_macro)=ccss-default”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:6] ExecIf(“SIP/1111-00000020”, “1?Set(CALLCOMPLETION(cc_recall_timer)=15)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:7] ExecIf(“SIP/1111-00000020”, “1?Set(CALLCOMPLETION(cc_max_agents)=5)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:8] ExecIf(“SIP/1111-00000020”, “1?Set(CALLCOMPLETION(cc_agent_dialstring)=Local/1111_1212@from-ccss-extension)”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:9] Set(“SIP/1111-00000020”, “CALLCOMPLETION(cc_callback_macro)=ccss-default”) in new stack

pbx*CLI>
– Executing [agent_config@sub-ccss:10] Return(“SIP/1111-00000020”, “”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:5] Set(“SIP/1111-00000020”, “DB(AMPUSER/1111/ccss/last_number)=1212”) in new stack

pbx*CLI>
– Executing [s@sub-ccss:6] Return(“SIP/1111-00000020”, “”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/1111-00000020”, “0?Set(CHANNEL(language)=)”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/1111-00000020”, “0?continue”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:14] Set(“SIP/1111-00000020”, “__TTL=64”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:15] GotoIf(“SIP/1111-00000020”, “1?continue”) in new stack

pbx*CLI>
– Goto (macro-user-callerid,s,26)

pbx*CLI>
– Executing [s@macro-user-callerid:26] Set(“SIP/1111-00000020”, “CALLERID(number)=1111”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:27] Set(“SIP/1111-00000020”, “CALLERID(name)=shlappy”) in new stack

pbx*CLI>
– Executing [s@macro-user-callerid:28] Set(“SIP/1111-00000020”, “CHANNEL(language)=en”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:2] Set(“SIP/1111-00000020”, “RingGroupMethod=none”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:3] Set(“SIP/1111-00000020”, “__EXTTOCALL=1212”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:4] Set(“SIP/1111-00000020”, “__PICKUPMARK=1212”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:5] Set(“SIP/1111-00000020”, “RT=15”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:6] Gosub(“SIP/1111-00000020”, “sub-record-check,s,1(exten,1212,)”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:1] GotoIf(“SIP/1111-00000020”, “1?check”) in new stack

pbx*CLI>
– Goto (sub-record-check,s,3)

pbx*CLI>
– Executing [s@sub-record-check:3] Set(“SIP/1111-00000020”, “MON_FMT=wav”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:4] GotoIf(“SIP/1111-00000020”, “1?next”) in new stack

pbx*CLI>
– Goto (sub-record-check,s,7)

pbx*CLI>
– Executing [s@sub-record-check:7] ExecIf(“SIP/1111-00000020”, “0?Return()”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:8] GotoIf(“SIP/1111-00000020”, “0?exten,1”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:9] Set(“SIP/1111-00000020”, “__REC_STATUS=INITIALIZED”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:10] ExecIf(“SIP/1111-00000020”, “0?Set(__REC_POLICY_MODE=)”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:11] Set(“SIP/1111-00000020”, “NOW=1330978126”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:12] Set(“SIP/1111-00000020”, “__DAY=05”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:13] Set(“SIP/1111-00000020”, “__MONTH=03”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:14] Set(“SIP/1111-00000020”, “__YEAR=2012”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:15] Set(“SIP/1111-00000020”, “__TIMESTR=20120305-120846”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:16] Set(“SIP/1111-00000020”, “__FROMEXTEN=1111”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:17] Set(“SIP/1111-00000020”, “__CALLFILENAME=exten-1212-1111-20120305-120846-1330978126.32”) in new stack

pbx*CLI>
– Executing [s@sub-record-check:18] Goto(“SIP/1111-00000020”, “exten,1”) in new stack

pbx*CLI>
– Goto (sub-record-check,exten,1)

pbx*CLI>
– Executing [exten@sub-record-check:1] GotoIf(“SIP/1111-00000020”, “0?callee”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:2] Set(“SIP/1111-00000020”, “__REC_POLICY_MODE=dontcare”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:3] GotoIf(“SIP/1111-00000020”, “1?caller”) in new stack

pbx*CLI>
– Goto (sub-record-check,exten,10)

pbx*CLI>
– Executing [exten@sub-record-check:10] Set(“SIP/1111-00000020”, “REC_POLICY_MODE=dontcare”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:11] GosubIf(“SIP/1111-00000020”, “0?record,1(exten,1212,1111)”) in new stack

pbx*CLI>
– Executing [exten@sub-record-check:12] Return(“SIP/1111-00000020”, “”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:7] GotoIf(“SIP/1111-00000020”, “1?macrodial”) in new stack

pbx*CLI>
– Goto (macro-exten-vm,s,13)

pbx*CLI>
– Executing [s@macro-exten-vm:13] GosubIf(“SIP/1111-00000020”, “0?clrheader,1()”) in new stack

pbx*CLI>
– Executing [s@macro-exten-vm:14] Macro(“SIP/1111-00000020”, “dial-one,15,tr,1212”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:1] Set(“SIP/1111-00000020”, “DEXTEN=1212”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:2] Set(“SIP/1111-00000020”, “DIALSTATUS_CW=”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:3] GosubIf(“SIP/1111-00000020”, “0?screen,1()”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:4] GosubIf(“SIP/1111-00000020”, “0?cf,1()”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:5] GotoIf(“SIP/1111-00000020”, “1?skip1”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,8)

pbx*CLI>
– Executing [s@macro-dial-one:8] GotoIf(“SIP/1111-00000020”, “0?nodial”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:9] GotoIf(“SIP/1111-00000020”, “0?continue”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:10] Set(“SIP/1111-00000020”, “EXTHASCW=ENABLED”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:11] GotoIf(“SIP/1111-00000020”, “0?next1:cwinusebusy”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,23)

pbx*CLI>
– Executing [s@macro-dial-one:23] GotoIf(“SIP/1111-00000020”, “1?next3:continue”) in new stack

pbx*CLI>
– Goto (macro-dial-one,s,24)

pbx*CLI>
– Executing [s@macro-dial-one:24] ExecIf(“SIP/1111-00000020”, “0?Set(DIALSTATUS_CW=BUSY)”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:25] GotoIf(“SIP/1111-00000020”, “0?nodial”) in new stack

pbx*CLI>
– Executing [s@macro-dial-one:26] GosubIf(“SIP/1111-00000020”, “1?dstring,1():dlocal,1()”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:1] Set(“SIP/1111-00000020”, “DSTRING=”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:2] Set(“SIP/1111-00000020”, “DEVICES=1212”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:3] ExecIf(“SIP/1111-00000020”, “0?Return()”) in new stack

pbx*CLI>
– Executing [dstring@macro-dial-one:4] ExecIf(“SIP/1111-00000020”, “0?Set(DEVICES=212)”) in new stack
– Executing [dstring@macro-dial-one:5] Set(“SIP/1111-00000020”, “LOOPCNT=1”) in new stack
– Executing [dstring@macro-dial-one:6] Set(“SIP/1111-00000020”, “ITER=1”) in new stack
– Executing [dstring@macro-dial-one:7] Set(“SIP/1111-00000020”, “THISDIAL=SIP/1212”) in new stack
– Executing [dstring@macro-dial-one:8] GosubIf(“SIP/1111-00000020”, “1?zap2dahdi,1()”) in new stack
– Executing [zap2dahdi@macro-dial-one:1] ExecIf(“SIP/1111-00000020”, “0?Return()”) in new stack
– Executing [zap2dahdi@macro-dial-one:2] Set(“SIP/1111-00000020”, “NEWDIAL=”) in new stack
– Executing [zap2dahdi@macro-dial-one:3] Set(“SIP/1111-00000020”, “LOOPCNT2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:4] Set(“SIP/1111-00000020”, “ITER2=1”) in new stack
– Executing [zap2dahdi@macro-dial-one:5] Set(“SIP/1111-00000020”, “THISPART2=SIP/1212”) in new stack
– Executing [zap2dahdi@macro-dial-one:6] ExecIf(“SIP/1111-00000020”, “0?Set(THISPART2=DAHDI/1212)”) in new stack
– Executing [zap2dahdi@macro-dial-one:7] Set(“SIP/1111-00000020”, “NEWDIAL=SIP/1212&”) in new stack
– Executing [zap2dahdi@macro-dial-one:8] Set(“SIP/1111-00000020”, “ITER2=2”) in new stack
– Executing [zap2dahdi@macro-dial-one:9] GotoIf(“SIP/1111-00000020”, “0?begin2”) in new stack
– Executing [zap2dahdi@macro-dial-one:10] Set(“SIP/1111-00000020”, “THISDIAL=SIP/1212”) in new stack
– Executing [zap2dahdi@macro-dial-one:11] Return(“SIP/1111-00000020”, “”) in new stack
– Executing [dstring@macro-dial-one:9] Set(“SIP/1111-00000020”, “DSTRING=SIP/1212&”) in new stack
– Executing [dstring@macro-dial-one:10] Set(“SIP/1111-00000020”, “ITER=2”) in new stack
– Executing [dstring@macro-dial-one:11] GotoIf(“SIP/1111-00000020”, “0?begin”) in new stack
– Executing [dstring@macro-dial-one:12] Set(“SIP/1111-00000020”, “DSTRING=SIP/1212”) in new stack
– Executing [dstring@macro-dial-one:13] Return(“SIP/1111-00000020”, “”) in new stack
– Executing [s@macro-dial-one:27] GotoIf(“SIP/1111-00000020”, “0?nodial”) in new stack
– Executing [s@macro-dial-one:28] GotoIf(“SIP/1111-00000020”, “0?skiptrace”) in new stack
– Executing [s@macro-dial-one:29] GosubIf(“SIP/1111-00000020”, “1?ctset,1():ctclear,1()”) in new stack
– Executing [ctset@macro-dial-one:1] Set(“SIP/1111-00000020”, “DB(CALLTRACE/1212)=1111”) in new stack
– Executing [ctset@macro-dial-one:2] Return(“SIP/1111-00000020”, “”) in new stack
– Executing [s@macro-dial-one:30] Set(“SIP/1111-00000020”, “D_OPTIONS=tr”) in new stack
– Executing [s@macro-dial-one:31] ExecIf(“SIP/1111-00000020”, “0?SIPAddHeader(Alert-Info: )”) in new stack
– Executing [s@macro-dial-one:32] ExecIf(“SIP/1111-00000020”, “0?SIPAddHeader()”) in new stack
– Executing [s@macro-dial-one:33] ExecIf(“SIP/1111-00000020”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [s@macro-dial-one:34] GosubIf(“SIP/1111-00000020”, “0?qwait,1()”) in new stack
– Executing [s@macro-dial-one:35] Set(“SIP/1111-00000020”, “__CWIGNORE=”) in new stack
– Executing [s@macro-dial-one:36] Set(“SIP/1111-00000020”, “__KEEPCID=TRUE”) in new stack
– Executing [s@macro-dial-one:37] GotoIf(“SIP/1111-00000020”, “0?usegoto,1”) in new stack
– Executing [s@macro-dial-one:38] GotoIf(“SIP/1111-00000020”, “0?godial”) in new stack
– Executing [s@macro-dial-one:39] Set(“SIP/1111-00000020”, “CONNECTEDLINE(name,i)=home”) in new stack
– Executing [s@macro-dial-one:40] Set(“SIP/1111-00000020”, “CONNECTEDLINE(num)=1212”) in new stack
– Executing [s@macro-dial-one:41] Set(“SIP/1111-00000020”, “D_OPTIONS=trI”) in new stack
– Executing [s@macro-dial-one:42] Dial(“SIP/1111-00000020”, “SIP/1212,15,trI”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Audio is at 5060
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x8 (alaw) to SDP
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.1.1.8:5060:
INVITE sip:1212@192.1.1.8:5060;transport=udp SIP/2.0

Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK4ba512f8

Max-Forwards: 70

From: “shlappy” sip:1111@192.1.1.130;tag=as31a99a1b

To: sip:1212@192.1.1.8:5060;transport=udp

Contact: sip:1111@192.1.1.130:5060

Call-ID: 570079d2470821434f4a010b35c2b13e@192.1.1.130:5060

CSeq: 102 INVITE

User-Agent: FPBX-2.10.0(1.8.7.1)

Date: Mon, 05 Mar 2012 20:08:46 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH

Supported: replaces, timer

Content-Type: application/sdp

Content-Length: 281

v=0

o=root 1382253317 1382253317 IN IP4 192.1.1.130

s=Asterisk PBX 1.8.7.1

c=IN IP4 192.1.1.130

t=0 0

m=audio 11646 RTP/AVP 0 8 3 101

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:3 GSM/8000

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

a=sendrecv


-- Called SIP/1212
-- Connected line update to SIP/1111-00000020 prevented.

pbx*CLI>

<— SIP read from UDP:192.1.1.8:49175 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK4ba512f8
From: “shlappy” sip:1111@192.1.1.130;tag=as31a99a1b
To: sip:1212@192.1.1.8:5060;transport=udp
Call-ID: 570079d2470821434f4a010b35c2b13e@192.1.1.130:5060
Date: Mon, 05 Mar 2012 GMT
CSeq: 102 INVITE
Server: Cisco-CP7970G/8.0
Contact: sip:1212@192.1.1.8:5060;transport=udp
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Allow-Events: kpml,dialog
Content-Length: 0

<------------->

pbx*CLI>
— (12 headers 0 lines) —

pbx*CLI>

<— SIP read from UDP:192.1.1.8:49176 —>
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK4ba512f8
From: “shlappy” sip:1111@192.1.1.130;tag=as31a99a1b
To: sip:1212@192.1.1.8:5060;transport=udp;tag=0013c4495b7a0fe61b5ab57b-93304efb
Call-ID: 570079d2470821434f4a010b35c2b13e@192.1.1.130:5060
Date: Mon, 05 Mar 2012 GMT
CSeq: 102 INVITE
Server: Cisco-CP7970G/8.0
Contact: sip:1212@192.1.1.8:5060;transport=udp
Allow: ACK,BYE,CANCEL,INVITE,NOTIFY,OPTIONS,REFER,REGISTER,UPDATE,SUBSCRIBE
Allow-Events: kpml,dialog
Content-Length: 0

<------------->
— (12 headers 0 lines) —

pbx*CLI>
– SIP/1212-00000021 is ringing

pbx*CLI>
Scheduling destruction of SIP dialog ‘570079d2470821434f4a010b35c2b13e@192.1.1.130:5060’ in 32000 ms (Method: INVITE)
Reliably Transmitting (no NAT) to 192.1.1.8:5060:
CANCEL sip:1212@192.1.1.8:5060;transport=udp SIP/2.0

Via: SIP/2.0/UDP 192.1.1.130:5060;branch=z9hG4bK4ba512f8

Max-Forwards: 70

From: “shlappy” sip:1111@192.1.1.130;tag=as31a99a1b

To: sip:1212@192.1.1.8:5060;transport=udp

Call-ID: 570079d2470821434f4a010b35c2b13e@192.1.1.130:5060

CSeq: 102 CANCEL

User-Agent: FPBX-2.10.0(1.8.7.1)

Content-Length: 0


pbx*CLI>
Scheduling destruction of SIP dialog ‘570079d2470821434f4a010b35c2b13e@192.1.1.130:5060’ in 32000 ms (Method: INVITE)

pbx*CLI>
== Spawn extension (macro-dial-one, s, 42) exited non-zero on ‘SIP/1111-00000020’ in macro ‘dial-one’

pbx*CLI>
== Spawn extension (macro-exten-vm, s, 14) exited non-zero on ‘SIP/1111-00000020’ in macro ‘exten-vm’

pbx*CLI>
== Spawn extension (from-internal, 1212, 2) exited non-zero on ‘SIP/1111-00000020’

pbx*CLI>
– Executing [h@from-internal:1] Macro(“SIP/1111-00000020”, “hangupcall,”) in new stack

pbx*CLI>
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/1111-00000020”, “1?theend”) in new stack

pbx*CLI>
– Goto (macro-hangupcall,s,3)

pbx*CLI>
– Executing [s@macro-hangupcall:3] Hangup(“SIP/1111-00000020”, “”) in new stack

pbx*CLI>
== Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/1111-00000020’ in macro ‘hangupcall’

pbx*CLI>
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/1111-00000020’

pbx*CLI>

So any ideas on how to get this to work?

You haven’t told me what the Cisco is expecting. I’m not going to search the Cisco documentation to find out myself.

However, at a wild guess, change

– Executing [s@macro-dial-one:42] Dial(“SIP/1212-0000001e”, “SIP/6969,trI”) in new stack

so it says SIP/6969/6969. This will make itsend INVITE sip:6969@192.1.1.1

I don’t know how you achieve this using your GUI. Maybe you should be declaring it as a “trunk” rather than an “extension”.

I’m pretty sure that the Cisco expects what any other SIP device would expect, something like this:
To: sip:6969@192.1.1.1:5060

instead of:
To: sip:192.1.1.1:5060

I’ll see if there’s a custom way with freepbx to change it as you suggest. Thanks for the feedback.

An ordinary telephone handset would not require the user field. Although it is probably objecting to the INVITE line, rather than the To: line, any device would insist on a tag parameter on the To: line.

The dial string syntax I gave will force the user field to be set. Without explicitly setting the user field, Asterisk itself, as against the GUI, has no idea what user field value should be sent. Note that, although commonly done by GUIs, setting the sip.conf section name to the extension number is not best current practice from a security point of view, so the user field cannot be inferred from that.

Although I haven’t used that GUI, my guess is that defining the device as a trunk and then routing the single number down that trunk should cause the user field to be set.

There may also be a sip.conf option to set a user field value to use, but I couldn’t find one on a quick skim of the sample configuration file.

So after much fiddling, I decided to try the link from asterisk to the Cisco CME as a trunk. Works now :smile: Here’s what I did to get it to work:
On the asterisk/freepbx side:
peer details for trunk:
host=192.1.1.1
username=6969
secret=mysecret
type=peer
qualify=no
nat=no
insecure=port,invite
dtmfmode=auto
disallow=all
context=from-internal
canreinvite=no
allow=ulaw&alaw

I set the outbound route dialplan to this:
6969 (my phones connected to fxs ports on the Cisco CME)
0804 (my Cisco ip phone registered to Cisco CME)

My ringgroup was set to this:
6969#
0804# (Note the # after the extension)

The sip config on the Cisco CME:
sip-ua
credentials username 6969 password 7 111C0D0D1E1C000509393F31383A31 realm 192.1.1.130
authentication username 6969 password 7 111C0D0D1E1C000509393F31383A31
calling-info pstn-to-sip from number set 6969
retry invite 2
sip-server ipv4:192.1.1.130
!
dial-peer voice 10 voip
destination-pattern 1…
session protocol sipv2
session target sip-server
dtmf-relay rtp-nte
no vad