ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to ring my IP phone. Therefore I wrote a simple PHP script which talks to my VoIP router. The phone rings as it should but when I send the "CANCEL" request the router always answers with "481 Call Leg/Transaction Does Not Exist" and the phone continues ringing. I check the Call-ID, CSeq and other ids a dozen times but everything seems to match. I also tried a "normal" VoIP client software, captured the data with Wireshark and compared them and found nothing wrong.
Does anyone have an idea where my mistake is? You'll find the complete data below. The router has IP 192.168.0.1 and the calling device has IP 192.168.0.2. The number "**100" is called (internal number).
I have zero knowledge of SIP protocol, but as no one else has stepped up I will offer the results of my own quick search.
Using the search term "481 Call Leg/Transaction Does Not Exist" as a starting point and DuckDuckGo search engine, I find many potentially helpful pages. This one from asterisk.org stands out as applicable on a quick scan, from which:
Quote:
I looked over the RFC 3261 and saw that
"The following procedures are used to construct a CANCEL request. The
Request-URI, Call-ID, To, the numeric part of CSeq, and From header
fields in the CANCEL request MUST be identical to those in the
request being cancelled, including tags. ..."
Those headers differ between the initial INVITE and the CANCEL requests in your example.
As there appears to be a shortage of SIP programmers participating here, you may get better response from any active VoIP forum - there appear to be many!
Good luck!
Last edited by astrogeek; 08-30-2017 at 04:00 PM.
Reason: typo
Just ran into exactly the same problem while trying to ring all phones connected to a Fritz!Box in response to an home-automation event. The solution is to prefix the "branch" id with the magic cookie "z9hG4bK" to signal compliance with the specification.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.