[HELP] routing distinctive ringing on sip accounts

I have two legacy phone numbers for a bsuiness that I have converted from POTS to an IP provider (broasdvoice). Since there are so few calls I have both numbers on the same SIP account. I am trying to route calls via the dictinctive ringing, but can’t seem to make it work.

I am not sure if I need an API or if I can use capture the alert-info and route from there. I have had little luck.

Below is the debug info…
5555551111 - is the main number from broadvoice.
5555550000 - is the person calling in

Here is a SIP debug for the first line:

INVITE sip:5555551111@192.168.100.245:5060 SIP/2.0
Call-ID: 300154-30@147.135.12.128
CSeq: 1 INVITE
From: "Some Person "sip:5555550000@147.135.12.128;user=phone;tag=0346
To: "Some Person"sip:s@192.168.100.245;user=phone
Via: SIP/2.0/UDP 147.135.12.128:5060
Contact: sip:5555550000@147.135.12.128:5060
Supported: 100rel
Content-Length: 234
Content-Type: application/sdp

Here is the SIP debug for the second line:

INVITE sip:5555551111@192.168.100.245:5060 SIP/2.0
Call-ID: 1a703c9-a7@147.135.12.128
CSeq: 1 INVITE
From: "Some Person"sip:5555550000@147.135.12.128;user=phone;tag=wz01
To: "Will Licata"sip:s@192.168.100.245;user=phone
Via: SIP/2.0/UDP 147.135.12.128:5060
Contact: sip:5555550000@147.135.12.128:5060
Supported: 100rel
Alert-Info: http://127.0.0.1/Bellcore-dr3
Content-Length: 301
Content-Type: application/sdp


They ring in to the same sip account – 5555551111

The only difference is the second number has an Alert-Info field:
Alert-Info: http://127.0.0.1/Bellcore-dr3

Is there an easy way to route based on the Alert-Info?

I already chedked out:
http://www.voip-info.org/wiki/view/Asterisk+SIP+channels

Thanks in advance.

try SipGetHeader
it will read a sip header (such as alert-info) into a variable. You can then use GotoIf() to route calls based on the contents of the new variable

Hope that helps!

IronHelix - thanks!

Works perfectly… I knew there had to be a way to pull the SIP header info.

Thanks again!