cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays

Asterisk SIP trunk to CUCM 11.5 with pjsip

2089
Views
10
Helpful
3
Comments

 Much of the Asterisk information on the internet is old.  I looked at Asterisk again after about 10 years since the last time.

 

I needed an auto dialer for my CUCM 11.5 cluster.  Here is a working pjsip.conf for the SIP trunks and extensions.conf.

 

My cluster is E.164 with 8 digit alternate numbers.  CUCM standard SIP profile with SIP OPTIONS Ping enabled.  Non Secure SIP Trunk Profile with "Accept unsolicited notification" and "Accept replaces header"

 

pjsip.conf

 

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

 

[CUCMTRUNK]
type=endpoint
context=sip-inbound
transport=transport-udp
disallow=all
allow=ulaw
identify_by=ip


[CUCM1](CUCMTRUNK)
aors=CUCM1

 

[CUCM1]
type=aor
contact=sip:10.1.1.20

 

[CUCM1]
type=identify
endpoint=CUCM1
match=10.1.1.20


[CUCM2](CUCMTRUNK)
aors=CUCM2

 

[CUCM2]
type=aor
contact=sip:10.1.1.21

 

[CUCM2]
type=identify
endpoint=CUCM2
match=10.1.1.21


[CUCM3](CUCMTRUNK)
aors=CUCM3

 

[CUCM3]
type=aor
contact=sip:10.2.2.3

 

[CUCM3]
type=identify
endpoint=CUCM3
match=10.2.2.3

 

extensions.conf

 

[sip-inbound]
include=asterisk-internal

 

[asterisk-internal]

 

exten=80013333,1,Answer()
same=n,Wait(1)
same=n,Playback(hello-world)
same=n,Hangup()

 

exten=_8XXXXXXX,1,Dial(PJSIP/${EXTEN}@CUCM3)
exten=_8XXXXXXX,2,Dial(PJSIP/${EXTEN}@CUCM2)
exten=_8XXXXXXX,3,Dial(PJSIP/${EXTEN}@CUCM1)


exten=_+.,1,Dial(PJSIP/${EXTEN}@CUCM3)
exten=_+.,2,Dial(PJSIP/${EXTEN}@CUCM2)
exten=_+.,3,Dial(PJSIP/${EXTEN}@CUCM1)

 

 

Comments
AlexC00011
Beginner

This config saved my life! I have half of the problem solved. 

I am able to make calls from asterisk environment to a phone registered behind CUCM's trunk. However, I am not able to route incoming calls from cisco into asterisk. What am I missing?

Every time I place a call from the cisco side to an asterisk extension, I get the following traffic in asterisk server.

Call tone is "busy"

 

tcpdump -i any -nn port 5060
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes


13:47:13.364668 IP 157.170.224.103.59869 > 10.180.69.241.5060: Flags [S], seq 3635636516, win 14600, options [mss 1460,sackOK,TS val 2555426310 ecr 0,nop,wscale 7], length 0
13:47:13.364729 IP 10.180.69.241.5060 > 157.170.224.103.59869: Flags [R.], seq 0, ack 3635636517, win 0, length 0

 

George Paxson
Beginner
Alex:
I haven't looked at this in a while and might not be of much help. I would try to get the Asterisk "Hello World" script working as a start. I checked and still have a route pattern pointing to the Asterisk trunk. 80013333 Nothing special.
I was testing as an auto dialing solution.
Extensions.conf

[asterisk-internal]

exten=80013333,1,Answer()
same=n,Wait(1)
same=n,Playback(hello-world)
same=n,Hangup()


SebastianV
Beginner

George, thanks for sharing! This was exactly what I needed to connect my CME to an intermediate Asterisk install to be able to connect multiple SIP trunks and annoy my girflriend with 'those bulky desktop phones' around the house.

Logged in to upvote your post :)