2

I am stuck on a project and need help. I have setup a SIP trunk on Cisco 2900 router to another vendors call server which is based on asterisk(custom application). We have phones register with the 2900 and some with the asterisk server. DID numbers are mapped to extension numbers on the Cisco router but The vendor has requested that one of the DID number from the range should be configured as the destination pattern on the SIP trunk. I suggested translating the DID number to an extension which will be configured as destination pattern on the SIP trunk but I was told it won’t work as the application needs to see the DID number. Is this possible? How do I go about this?

  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer. – Ron Maupin Jun 2 '18 at 0:23
  • We had to manipulate sip header using sip profile and the issue was resolved. voice class sip-profiles 1 request INVITE sip-header From modify "<sip:(.*)@(.*)>" "<sip:real number@192.168.1.1>" – gnome247 Jun 16 '18 at 22:06
  • You should post an answer and accept it so that the question doesn't keep popping up forever, looking for an answer. – Ron Maupin Jun 16 '18 at 22:15
  • @RonMaupin How do I post the answer? I have search all everywhere but couldn't get the option to do so. – gnome247 Jun 17 '18 at 7:04
  • Just enter it in the box at the bottom of the screen, titled Your Answer, and after you enter your answer, click the Post Your Answer button that is right below the box. – Ron Maupin Jun 17 '18 at 16:41
2

I have a solution working with a Cisco 2800 acting as a Session Border Controller (CUBE) in front of an Asterisk box.

The inbound patterns and outbound patterns don't overlap (for me) so its a matter of getting the SIP service/SIP UA working and defining voice peers for each direction.

!
! Basic SIP service
!
!
voice rtp send-recv
!
voice service voip
 ip address trusted list
  ipv4 1.2.3.4
  ipv4 3.4.5.6
  ipv4 5.6.7.8
 allow-connections sip to sip
 fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
 sip
  registrar server expires max 65535 min 3600
  early-offer forced
  midcall-signaling passthru
!
voice class codec 1
 codec preference 1 g711alaw
 codec preference 2 g711ulaw
 codec preference 3 g729br8
!
!


!
sip-ua
 credentials username uuuuuuuuu password ppppppppppp realm sipconnect.hipcom.co.uk
 authentication username uuuuuuuuuu password 7 ppppppppppp
 no remote-party-id
 retry invite 3
 retry bye 3
 retry cancel 5
 retry prack 6
 retry register 3
 timers options 1000
 registrar dns:sipconnect.hipcom.co.uk expires 300
 sip-server dns:sipconnect.hipcom.co.uk
 host-registrar
!

Dial-peer for incoming calls

!
! incoming (trunk to asterisk) peers are in the form:
!
dial-peer voice 1000 voip
 description *** Incoming for 01632001122 Trunk -> Asterisk ***
 destination-pattern 441632001122
 session protocol sipv2
 session target ipv4:3.4.5.6  // asterisk server
 session transport udp
 dtmf-relay rtp-nte
 codec transparent
 no vad
!

You have as many of these as you need for DDI/DID and/or use pattern matching.

Dial-peers for outgoing calls

!
dial-peer voice 2000 voip
 description *** Outgoing -> BT SIP trunk ***
 destination-pattern 0.T
 session protocol sipv2
 session target sip-server
 session transport udp
 dtmf-relay rtp-nte
 codec transparent
 no vad
!

above does the default pattern for anything with a leading zero.

Other patterns handle information numbers (operator, etc) and and a further pattern handles emergency numbers (999, 911, etc)

!
dial-peer voice 2300 voip
 description *** Outgoing -> BT SIP Trunk: Information numbers ***
 destination-pattern 1..
 session protocol sipv2
 session target sip-server
 session transport udp
 dtmf-relay rtp-nte
 codec transparent
 no vad
!
dial-peer voice 2400 voip
 description *** Outgoing -> BT SIP Trunk: Emergency numbers ***
 destination-pattern 9..
 session protocol sipv2
 session target sip-server
 session transport udp
 dtmf-relay rtp-nte
 codec transparent
 no vad
!

More information

You'll find more about using Cisco CUBE as an SBC in front of Asterisk on my blog article.

| improve this answer | |
0

We where able to resolve the issue by manipulating the sip-header to show the external/PSTN number when request invite is sent to the asterisk server.

voice class sip-profiles 1

request INVITE sip-header From modify "<sip:(.*)@(.*)>" "<sip:real number@192.168.1.1>"

The sip profile was applied on the sip trunk to the asterisk server.

| improve this answer | |
  • Please accept your answer so that the question doesn't keep popping up forever, looking for an answer. Click the check mark below the arrows to the left of your answer. – Ron Maupin Jun 17 '18 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.