[Freeswitch-users] Wrong release cause text, bug?

David Villasmil david.villasmil.work at gmail.com
Sat Jun 9 00:48:23 UTC 2018


Anthony,

Doing something like:

        case SWITCH_CAUSE_NETWORK_OUT_OF_ORDER:
                return 503;
        case SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION:
                return 503;
        case SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE:
                return 503;
        case SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL:
                return 503;
        case SWITCH_CAUSE_SWITCH_CONGESTION:
                return 503;
        case SWITCH_CAUSE_GATEWAY_DOWN:
                return 503;

Would go a long way into actually reporting the text properly, ordering
alphabetically and returning the corresponding code.

Would this be wrong?

Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337

ᐧ

On Fri, Jun 8, 2018 at 11:43 PM David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Yep, I'm hanging up with a custom cause. What surprises me is the
> inconsistency of the reason text.
>
> I'm trying to use the causes to act on it, but i.e.
> BEARERCAPABILITY_NOTIMPL is not caught by the sending fs, the variable
> comes up empty...
>
> On Fri, Jun 8, 2018, 23:18 Anthony Minessale <anthony.minessale at gmail.com>
> wrote:
>
>> If the sip stack hangs up due to its own decision.  it will not use a
>> custom response.  We can only control the response when its FS who triggers
>> the bye.
>>
>>
>> On Thu, Jun 7, 2018 at 4:11 PM, David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> Hello guys,
>>>
>>> When hanging up a call with a specific release, FS sends the specific
>>> code, i.e.:
>>>
>>> if i release a call like so:
>>>
>>> <action inline="true" application="set" data="release_code=483
>>> EXCHANGE_ROUTING_ERROR"/>
>>>
>>> The BYE message is as follows:
>>>
>>>    SIP/2.0 483 EXCHANGE_ROUTING_ERROR
>>>    Via: SIP/2.0/UDP 1.2.3.4:5080;rport=5080;branch=z9hG4bK0y1H2X8899veB
>>>    Max-Forwards: 69
>>>    From: "david.villasmil" <sip:david.villasmil at 1.2.3.4
>>> >;tag=t35r9gatZFcjj
>>>    To: <sip:9999999 at 1.2.3.4:5080>;tag=pB7mFpUrc30gB
>>>    Call-ID: e2da7a79-e537-1236-5691-02e1e654f872
>>>    CSeq: 123866386 INVITE
>>>    User-Agent: FreeSWITCH-mod_sofia/1.6.20-37-987c9b9~64bit
>>>    Accept: application/sdp
>>>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
>>> REGISTER, REFER, NOTIFY
>>>    Supported: timer, path, replaces
>>>    Allow-Events: talk, hold, conference, refer
>>>    Reason: Q.850;cause=25;text="EXCHANGE_ROUTING_ERROR"
>>>    Content-Length: 0
>>>    X-FS-Display-Name: 9999999
>>>    X-FS-Display-Number: sip:9999999 at 1.2.3.4
>>>    Remote-Party-ID: "9999999" <sip:9999999 at 1.2.3.4
>>> >;party=calling;privacy=off;screen=no
>>>
>>> Another example:
>>>
>>> <action inline="true" application="set" data="release_code=410
>>> NUMBER_CHANGED"/>
>>>
>>> The BYE message is SOMETIMES as follows:
>>>
>>>    SIP/2.0 410 NUMBER_CHANGED
>>>    Via: SIP/2.0/UDP 1.2.3.4:5080;rport=5080;branch=z9hG4bKZN8r02Q5c16UF
>>>    Max-Forwards: 69
>>>    From: "david.villasmil" <sip:david.villasmil at 1.2.3.4
>>> >;tag=Q8Se4ZQF8m9SF
>>>    To: <sip:9999999 at 1.2.3.4:5080>;tag=mSm3B0SHjHmBm
>>>    Call-ID: dfbb5497-e537-1236-5691-02e1e654f872
>>>    CSeq: 123866383 INVITE
>>>    User-Agent: FreeSWITCH-mod_sofia/1.6.20-37-987c9b9~64bit
>>>    Accept: application/sdp
>>>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
>>> REGISTER, REFER, NOTIFY
>>>    Supported: timer, path, replaces
>>>    Allow-Events: talk, hold, conference, refer
>>>    Reason: Q.850;cause=22;text="NUMBER_CHANGED"
>>>    Content-Length: 0
>>>    X-FS-Display-Name: 9999999
>>>    X-FS-Display-Number: sip:9999999 at 1.2.3.4
>>>    Remote-Party-ID: "9999999" <sip:9999999 at 54.84.149.30
>>> >;party=calling;privacy=off;screen=no
>>>
>>> And other times as follows:
>>>
>>>    SIP/2.0 410 Gone
>>>    Via: SIP/2.0/UDP 1.2.3.4:32200
>>> ;branch=z9hG4bK-d8754z-86e4295fca2efa0a-1---d8754z-;rport=32200
>>>    Max-Forwards: 69
>>>    From: <sip:david.villasmil at 1.2.3.4;transport=UDP>;tag=42169b65
>>>    To: <sip:9999999 at 1.2.3.4;transport=UDP>;tag=pZ0N246BBcK7K
>>>    Call-ID: YmU5YjEwODk2ZmZhODJjNDgzNTNlM2FiZWVmMjI2MDg.
>>>    CSeq: 1 INVITE
>>>    User-Agent: FreeSWITCH-mod_sofia/1.6.20-37-987c9b9~64bit
>>>    Accept: application/sdp
>>>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
>>> REGISTER, REFER, NOTIFY
>>>    Supported: timer, path, replaces
>>>    Allow-Events: talk, hold, conference, refer
>>>    Reason: Q.850;cause=16;text="NORMAL_CLEARING"
>>>    Content-Length: 0
>>>    Remote-Party-ID: "9999999" <sip:9999999 at 1.2.3.4
>>> >;party=calling;privacy=off;screen=no
>>>
>>>
>>> But I've noticed that when i do:
>>>
>>> <action inline="true" application="set" data="release_code=488
>>> BEARERCAPABILITY_NOTIMPL"/>
>>>
>>> The BYE message is as follows:
>>>
>>>    SIP/2.0 488 BEARERCAPABILITY_NOTIMPL
>>>    Via: SIP/2.0/UDP 1.2.3.4:5080;rport=5080;branch=z9hG4bK3SDv7eUK14Z6D
>>>    Max-Forwards: 69
>>>    From: "david.villasmil" <sip:david.villasmil at 1.2.3.4
>>> >;tag=F3am0c2594H7a
>>>    To: <sip:9999999 at 1.2.3.4:5080>;tag=6XDmXaZj5BQ8S
>>>    Call-ID: aeb6624e-e539-1236-5691-02e1e654f872
>>>    CSeq: 123866772 INVITE
>>>    User-Agent: FreeSWITCH-mod_sofia/1.6.20-37-987c9b9~64bit
>>>    Accept: application/sdp
>>>    Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE,
>>> REGISTER, REFER, NOTIFY
>>>    Supported: timer, path, replaces
>>>    Allow-Events: talk, hold, conference, refer
>>>    Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION"
>>>    Content-Length: 0
>>>    X-FS-Display-Name: 9999999
>>>    X-FS-Display-Number: sip:9999999 at 1.2.3.4
>>>    Remote-Party-ID: "9999999" <sip:9999999 at 54.84.149.30
>>> >;party=calling;privacy=off;screen=no
>>>
>>>
>>> So I guess, my question is why sometimes the "text" is set properly, and
>>> sometimes not??
>>>
>>>
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.work at gmail.com
>>> phone: +34669448337
>>>>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Services
>>> sales at freeswitch.com
>>> https://freeswitch.com
>>>
>>> Official FreeSWITCH Sites
>>> https://freeswitch.com/oss
>>> https://freeswitch.org/confluence
>>> https://cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> https://freeswitch.com
>>>
>>
>>
>>
>> --
>> Anthony Minessale II
>> Founder, FreeSWITCH.
>> http://freeswitch.com
>>
>>
>> https://youtu.be/l_hOxzCt6X4
>> https://www.youtube.com/watch?v=oAxXgyx5jUw
>> https://www.youtube.com/watch?v=9XXgW34t40s
>> https://www.youtube.com/watch?v=NLaDpGQuZDA
>> _________________________________________________________________________
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> https://freeswitch.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180609/4443eb03/attachment-0001.html>


More information about the FreeSWITCH-users mailing list