Outbound Route

I have just configured my asterisk box as a sip gateway for a Cisco call manager express. Almost everything is working. The call manager and asterisk can call each other’s extensions, and external inbound calls work to the call manager. (Tested with my cell phone). The only thing that is not working is outbound calls from the call manager. I believe it is something on the asterisk side, because when an external call is placed through the call manager, I get the message “The number you have dialed is not in service”. If I shut down the asterisk box, outbound calls from the call manager won’t do anything. So I know that the two registered fine. The call manager is sip trunked to the asterisk box. GoogleVoice—Asterisk----CallManager—Phones I posted the output of asterisk –vvvvvvvvvvr when placing an outbound call, and my outbound route, and sip trunk. Can someone please help me get the outbound calls working? Thank you!

(10.10.10.1 is call manager. Asterisk is 192.168.1.109)

Sip to call manager peer details:
type=friend
fromuser=ccme
username=ccme
secret=cisco
qualify=yes
nat=no
insecure=very
host=10.10.10.1
fromdomain=10.10.10.1
dtmf=rfc2833
disallow=all
canreinvite=no
allow=gsm&ulaw&alaw&g729
registersip=yes

Sip to call manager user details:
type=friend
fromuser=ccme
username=ccme
secret=cisco
qualify=yes
nat=no
insecure=very
host=10.10.10.1
fromdomain=10.10.10.1
dtmf=rfc2833
disallow=all
context=from-internal
canreinvite=no
allow=gsm&ulaw&alaw&g729

Outbound route:

Outbound is done through google voice in PBX in a flash.

Output:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] NoOp(“SIP/192.168.1.109-00000048”, “Received incoming SIP connection from unknown peer to 8005532447”) in new stack
– Executing [[email protected]:2] Set(“SIP/192.168.1.109-00000048”, “DID=8005532447”) in new stack
– Executing [[email protected]:3] Goto(“SIP/192.168.1.109-00000048”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“SIP/192.168.1.109-00000048”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [[email protected]:2] GotoIf(“SIP/192.168.1.109-00000048”, “0?setlanguage:from-trunk,8005532447,1”) in new stack
– Goto (from-trunk,8005532447,1)
– Executing [[email protected]:1] Set(“SIP/192.168.1.109-00000048”, “__FROM_DID=8005532447”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/192.168.1.109-00000048”, “Received an unknown call with DID set to 8005532447”) in new stack
– Executing [[email protected]:3] Goto(“SIP/192.168.1.109-00000048”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“SIP/192.168.1.109-00000048”, “”) in new stack
– Executing [[email protected]:3] Wait(“SIP/192.168.1.109-00000048”, “2”) in new stack
– Executing [[email protected]:4] Playback(“SIP/192.168.1.109-00000048”, “ss-noservice”) in new stack
– <SIP/192.168.1.109-00000048> Playing ‘ss-noservice.gsm’ (language ‘en’)
– Executing [[email protected]:5] SayAlpha(“SIP/192.168.1.109-00000048”, “8005532447”) in new stack
– <SIP/192.168.1.109-00000048> Playing ‘digits/8.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/3.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/2.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000048> Playing ‘digits/7.gsm’ (language ‘en’)
– Executing [[email protected]:6] Hangup(“SIP/192.168.1.109-00000048”, “”) in new stack
== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/192.168.1.109-00000048’
– Executing [[email protected]:1] Macro(“SIP/192.168.1.109-00000048”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/192.168.1.109-00000048”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/192.168.1.109-00000048”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/192.168.1.109-00000048”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/192.168.1.109-00000048’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/192.168.1.109-00000048’

Your trunk doesn’t match what the CME is sending “from unknown peer to 8005532447” hence the unknown peer.

You don’t need both user and peer details if they are the same.

Pick one CODEC, I am sure you don’t have any g.729 licenses, besides they eat up DSP’s on the Cisco.

You don’t need a secret, fromuser or username, just authenticate on IP.

registersip is not a directive

insecure should be port,invite not yes.

You don’t need a SIP-UA directive in the CME. Show us the dialpeer details from the CME.

Thank you for the reply! I have changed the peer details to:

type=friend
qualify=yes
nat=no
insecure=port,invite
host=10.10.10.1
fromdomain=10.10.10.1
dtmf=rfc2833
disallow=all
canreinvite=no
allow=ulaw

I then configured cme to register using the asterisk ip without usernames and secrets.

The dialpeer im using is

dial-peer voice 1 voip
destination-pattern [2-9]…[2-9]…
voice-class codec 1
session protocol sipv2
session target ipv4:192.168.1.109
dtmf-relay sip-notify
dtmf-relay rtp-nte
codec g711ulaw
no vad

and in case you need it the output of show dial-plan on CME.

Router#show dial-peer voice 1
VoiceOverIpPeer1
peer type = voice, system default peer = FALSE, information type = voice,
description = ', tag = 1, destination-pattern =[2-9]…[2-9]…’,
voice reg type = 0, corresponding tag = 0,
allow watch = FALSE
answer-address = ', preference=0, CLID Restriction = None CLID Network Number ='
CLID Second Number sent
CLID Override RDNIS = disabled,
source carrier-id = ', target carrier-id =',
source trunk-group-label = ', target trunk-group-label =',
numbering Type = unknown' group = 1, Admin state is up, Operation state is up, incoming called-number =', connections/maximum = 0/unlimited,
DTMF Relay = enabled,
modem transport = system,
URI classes:
Incoming (Request) =
Incoming (To) =
Incoming (From) =
Destination =
huntstop = disabled,
in bound application associated: 'DEFAULT’
out bound application associated: ''
dnis-map =
permission :both
incoming COR list:maximum capability
outgoing COR list:minimum requirement
Translation profile (Incoming):
Translation profile (Outgoing):
incoming call blocking:
translation-profile = ' disconnect-cause =no-service’
advertise 0x40 capacity_update_timer 25 addrFamily 4 oldAddrFamily 4
type = voip, session-target = ipv4:192.168.1.109', technology prefix: settle-call = disabled ip media DSCP = ef, ip signaling DSCP = af31, ip video rsvp-none DSCP = af41,ip video rsvp-pass DSCP = af41 ip video rsvp-fail DSCP = af41, UDP checksum = disabled, session-protocol = sipv2, session-transport = system, req-qos = best-effort, acc-qos = best-effort, req-qos video = best-effort, acc-qos video = best-effort, req-qos audio def bandwidth = 64, req-qos audio max bandwidth = 0, req-qos video def bandwidth = 384, req-qos video max bandwidth = 0, dtmf-relay = rtp-nte, RTP dynamic payload type values: NTE = 101 Cisco: NSE=100, fax=96, fax-ack=97, dtmf=121, fax-relay=122 CAS=123, TTY=119, ClearChan=125, PCM switch over u-law=0, A-law=8, GSMAMR-NB=117 iLBC=116 h263+=118, h264=119 G726r16 using static payload G726r24 using static payload RTP comfort noise payload type = 19 fax rate = voice, payload size = 20 bytes fax protocol = system fax-relay ecm enable Fax Relay SG3-to-G3 Enabled (by system configuration) fax NSF = 0xAD0051 (default) voice-class codec = 1 codec = g729r8, payload size = 20 bytes, video codec = None voice class codec = 1 text relay = disabled Media Setting = flow-through (global) Expect factor = 10, Icpif = 20, Playout Mode is set to adaptive, Initial 60 ms, Max 250 ms Playout-delay Minimum mode is set to default, value 40 ms Fax nominal 300 ms Max Redirects = 1, signaling-type = cas, VAD = disabled, Poor QOV Trap = disabled, Source Interface = NONE voice class sip url = system, voice class sip rel1xx = system, tvoice class sip outbound-proxy = system, voice class sip asserted-id = system, voice class sip privacy = system, voice class sip e911 = system, redirect ip2ip = disabled local peer = false probe disabled, Secure RTP: system (use the global setting) voice class perm tag ='
Time elapsed since last clearing of voice call statistics never
Connect Time = 6754, Charged Units = 0,
Successful Calls = 3, Failed Calls = 0, Incomplete Calls = 0
Accepted Calls = 1, Refused Calls = 0,
Last Disconnect Cause is "10 ",
Last Disconnect Text is “normal call clearing (16)”,
Last Setup Time = 100856.
Last Disconnect Time = 102286.

THANKS AGAIN!!!

I forgot to mention, after the new configuration, I still get “the number you have dialed is not in service” when dialing out from CME, asterisk sip phones work fine. Inbound to cme still works though.

Thanks

You only want dtmf sip-notify you still have the fromdomain variable in your peer.

You also need session transport udp in your dial peer.

Okay, I changed the dial-peer to:

dial-peer voice 1 voip
destination-pattern [2-9]…[2-9]…
voice-class codec 1
session protocol sipv2
session target ipv4:192.168.1.109
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
no vad

Everything but outbound calls work. I am still getting the “number not in service”

I believe I get the same debugging info as well. The 800 number I dialed is a test number I dialed. (It is in service)

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] NoOp(“SIP/192.168.1.109-00000002”, “Received incoming SIP connection from unknown peer to 8005532447”) in new stack
– Executing [[email protected]:2] Set(“SIP/192.168.1.109-00000002”, “DID=8005532447”) in new stack
– Executing [[email protected]:3] Goto(“SIP/192.168.1.109-00000002”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“SIP/192.168.1.109-00000002”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [[email protected]:2] GotoIf(“SIP/192.168.1.109-00000002”, “0?setlanguage:from-trunk,8005532447,1”) in new stack
– Goto (from-trunk,8005532447,1)
– Executing [[email protected]:1] Set(“SIP/192.168.1.109-00000002”, “__FROM_DID=8005532447”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/192.168.1.109-00000002”, “Received an unknown call with DID set to 8005532447”) in new stack
– Executing [[email protected]om-trunk:3] Goto(“SIP/192.168.1.109-00000002”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“SIP/192.168.1.109-00000002”, “”) in new stack
– Executing [[email protected]:3] Wait(“SIP/192.168.1.109-00000002”, “2”) in new stack
– Executing [[email protected]:4] Playback(“SIP/192.168.1.109-00000002”, “ss-noservice”) in new stack
– <SIP/192.168.1.109-00000002> Playing ‘ss-noservice.gsm’ (language ‘en’)
– Executing [[email protected]:5] SayAlpha(“SIP/192.168.1.109-00000002”, “8005532447”) in new stack
– <SIP/192.168.1.109-00000002> Playing ‘digits/8.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/3.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/2.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/192.168.1.109-00000002> Playing ‘digits/7.gsm’ (language ‘en’)
– Executing [[email protected]:6] Hangup(“SIP/192.168.1.109-00000002”, “”) in new stack
== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/192.168.1.109-00000002’
– Executing [[email protected]:1] Macro(“SIP/192.168.1.109-00000002”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/192.168.1.109-00000002”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/192.168.1.109-00000002”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/192.168.1.109-00000002”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/192.168.1.109-00000002’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/192.168.1.109-00000002’

It’s never going to work until you get them to match “Received incoming SIP connection from unknown peer to 8005532447”) in new stack"

Did you take the from-domain out? You also don’t need the sip-ua, you don’t want the Cisco registering, it has a static IP.

I took the from-domain out. I also reconfigured CME without the sip-ua. I can still receive incoming calls, but I cannot place them. I can place calls from a asterisk SIP client just not the CME.

I seem to be getting the same out put:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Set(“SIP/in-0000001b”, “GROUP()=OUT_3”) in new stack
– Executing [[email protected]:2] Goto(“SIP/in-0000001b”, “from-trunk,8005532447,1”) in new stack
– Goto (from-trunk,8005532447,1)
– Executing [[email protected]:1] Set(“SIP/in-0000001b”, “__FROM_DID=8005532447”) in new stack
– Executing [[email protected]:2] NoOp(“SIP/in-0000001b”, “Received an unknown call with DID set to 8005532447”) in new stack
– Executing [[email protected]:3] Goto(“SIP/in-0000001b”, “s,a2”) in new stack
– Goto (from-trunk,s,2)
– Executing [[email protected]:2] Answer(“SIP/in-0000001b”, “”) in new stack
– Executing [[email protected]:3] Wait(“SIP/in-0000001b”, “2”) in new stack
– Executing [[email protected]:4] Playback(“SIP/in-0000001b”, “ss-noservice”) in new stack
– <SIP/in-0000001b> Playing ‘ss-noservice.gsm’ (language ‘en’)
– Executing [[email protected]:5] SayAlpha(“SIP/in-0000001b”, “8005532447”) in new stack
– <SIP/in-0000001b> Playing ‘digits/8.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/0.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/5.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/3.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/2.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/4.gsm’ (language ‘en’)
– <SIP/in-0000001b> Playing ‘digits/7.gsm’ (language ‘en’)
– Executing [[email protected]:6] Hangup(“SIP/in-0000001b”, “”) in new stack
== Spawn extension (from-trunk, s, 6) exited non-zero on ‘SIP/in-0000001b’
– Executing [[email protected]:1] Macro(“SIP/in-0000001b”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/in-0000001b”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,3)
– Executing [[email protected]:3] ExecIf(“SIP/in-0000001b”, “0?Set(CDR(recordingfile)=)”) in new stack
– Executing [[email protected]:4] Hangup(“SIP/in-0000001b”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/in-0000001b’ in macro ‘hangupcall’
== Spawn extension (from-trunk, h, 1) exited non-zero on 'SIP/in-0000001b

Go into the file etc/asterisk/sip_additional.conf and post the peers that are related to the Cisco. You have a simple issue.

I’m a little new to Linux and Asterisk, but I believe I was able to find what you are looking for (out is the PEER Details and in is the USER Details)

[in]
disallow=all
type=friend
qualify=yes
nat=no
insecure=port,invite
host=10.10.10.1
dtmf=rfc2833
canreinvite=no
allow=ulaw
context=from-trunk-sip-out

[out]
disallow=all
type=friend
qualify=yes
nat=no
insecure=port,invite
host=10.10.10.1
dtmf=rfc2833
canreinvite=no
allow=ulaw
context=from-trunk-sip-out

Ok…Again you only need one peer. In and Out sections are provided for when you have 2 different servers. Delete one and change the context to from-internal

Is 10.10.10.1 the CME address? Sure looks like it is sending a username.

Now I need one more debug because something else is wrong.

Enter these commands at asterisk prompt.

core set verbose 0
sip set debug ip 10.10.10.1

Make a call from CME

Capture SIP messages and paste them here

Now turn it off

sip set debug off

Post and we will keep working on it. You can also buy an hour worth of FreePBX support and ask for me and I can fix it for you.

THANK YOU SO MUCH!

I deleted the user details and added context=from-internal and now outbound calls work!!

Thank you for taking time to help me fix this.

-Austin

I know this was over a year ago… Thank you for this solution. Thank you Austin, for presenting the issue so clearly, Thank you SkyKingOH, for being so patient and clear in your solution.