Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asterisk 1.8 SIP INVITE phone-context

Status
Not open for further replies.

kg4ysy

Programmer
Nov 12, 2010
5
0
0
US
I am in the process of switching from Asterisk 1.6 to 1.8 and running into an issue with our CS1000 SIP trunks. The CS1000 sends a SIP INVITE with phone-context=udp.cdp. In Asterisk 1.6, this appears to be ignored. On Asterisk 1.8, this is added to the DID of the incoming call. If you call to our Asterisk 1.8 machine you get the no-service message followed by the extension as "4590;phone-context=udp.cdp" This is read out by the machine over the phone. We don't have much control over the SIP coming from the CS1000 unfortunately. As a temporary fix, I changed the Goto function in the incoming context.

Code:
[from-trunk-sip-CS1000]
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,n,Goto(from-trunk,${EXTEN:0:-22},1)

This "works", but I'd like to understand why Asterisk appears to not understand the phone-context string enough to strip it out. I don't think the "fix" above is a permanent solution by any means.

Thanks!
 
Something a little more elegant...

Code:
[from-trunk-sip-CS1000]
exten => _.,1,Set(GROUP()=OUT_2)
exten => _.,2,GotoIf($[ "${EXTEN:-22}" = ";phone-context=udp.cdp"]?goto1:goto2
exten => _.,n(goto1),Goto(from-trunk,${EXTEN:0:-22},1)
exten => _.,n(goto2),Goto(from-trunk,${EXTEN},1)
 
I've noticed this issue, too, since coming from 1.6 to 1.8. Have you filed a bug report?
 
Thanks for the update. We are CS1000 to Asterisk as well. The change above worked for us. We ended up rolling back to 1.6 because of a few other issues. Glad to see this is being tracked on Asterisk's end.
 
Would you be willing to post your configuration for how you're connecting Asterisk to your CS1000 and vice versa? I tried to implement your fix, but I couldn't get it to work, and I think it may have to do with configuration differences.
 
We are using FreePBX on this side, so it is all over the place.

Can you post the section of /var/log/asterisk/full of a call from CS1000 into your Asterisk box? We need to find the context these calls are coming from and what is after "phone-context
 
We also use FreePBX. I think I posted a log in the bug report I mentioned. As I recall, it starts off in from-sip-external, and then to from-trunk. From there, it goes to ext-did, and finally to a custom context for meetme conferencing.

As far as the connectivity between Asterisk and Nortel, Asterisk just sends the calls to the node IP on the CS1000. The Asterisk box is setup as a static SIP endpoint in NRS, but there is no registration between the two So, I have allow anonymous SIP calls enabled on the Asterisk box. Ideally, I'd like them to be registered to one another so I could turn that off. That's the main reason I was asking.
 
I think the reason it's not working is because the call in coming into from-sip-external, and never hits from-trunk-sip-external. I tried changing from-sip-external, but it doesn't seem to have done anything.
 
I modified from-sip-external to send calls to from-trunk-sip-CS1000 instead of from-trunk. Then, I made your changes to from-trunk-sip-CS1000, and it is now formatting the DID correctly. I'd rather not do it that way, but I suppose it will work for the time being.

I would still be interested in knowing how you had your trunk setup.
 
Sorry for the delay. I had a busy weekend. Glad that you got yours working. In response to the trunk setup. Ours is set up the same way. I don't want to do this, but we are running 5.0 on the CS1000. We are upgrading to 7.0 later this month which should give us better SIP control. According to our CS1000 tech, he can't do much with the SIP trunks with 5.0. Until we upgrade, it doesn't look like we can register the trunks.

Once we have that ability, I'm turning anonymous off for sure.

Let me know if you have any other questions. Information for Asterisk to CS1000 is sparse. Good to know there is someone else beating their head on the desk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top