Route to media-server, but reply negative

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Route to media-server, but reply negative

Remco .
Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

Max Mühlbronner

Hi,

 

regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.

 

Best Regards

 

Max M.

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Remco .
Gesendet: Samstag, 13. Oktober 2012 22:52
An: OpenSIPS users mailling list
Betreff: [OpenSIPS-Users] Route to media-server, but reply negative

 

Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("<a href="sip:AN_invalidnumber@[ip%20of%20mediaserver]:5060">sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

Remco .
Thanks Max. That does the trick for the Asterisk part. However, calls are now returned with 603-declined. Anyone on how to make opensips wait for the message to complete, and then return 404?

On Sat, Oct 13, 2012 at 11:06 PM, Max Mühlbronner <[hidden email]> wrote:

Hi,

 

regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.

 

Best Regards

 

Max M.

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Remco .
Gesendet: Samstag, 13. Oktober 2012 22:52
An: OpenSIPS users mailling list
Betreff: [OpenSIPS-Users] Route to media-server, but reply negative

 

Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

Flavio Goncalves
Remco, 

Use hangup with a code. 

Example: hangup(17)  generates a 486 message. 


Flavio E. Goncalves


2012/10/14 Remco . <[hidden email]>
Thanks Max. That does the trick for the Asterisk part. However, calls are now returned with 603-declined. Anyone on how to make opensips wait for the message to complete, and then return 404?

On Sat, Oct 13, 2012 at 11:06 PM, Max Mühlbronner <[hidden email]> wrote:

Hi,

 

regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.

 

Best Regards

 

Max M.

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Remco .
Gesendet: Samstag, 13. Oktober 2012 22:52
An: OpenSIPS users mailling list
Betreff: [OpenSIPS-Users] Route to media-server, but reply negative

 

Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

Muhammad Shahzad
In reply to this post by Remco .
What you are do is wrong. You are forwarding leg B to Asterisk and at the same time telling leg A that destination not found. So its obvious that you will get 6xx response.

The right way to do it is set Asterisk as next destination in failure route and let asterisk play the IVR in 183 early media and then return congestion. So, call will again will be returned again in failure route where you will check that it came from you Asterisk server (and not from upstream carrier), so you change the congestion code 480 (or whatever you get from asterisk) to 404 not found and return to caller.

This way both caller and CDRs will get right call response.

Thank you.


On Sun, Oct 14, 2012 at 11:55 AM, Remco . <[hidden email]> wrote:
Thanks Max. That does the trick for the Asterisk part. However, calls are now returned with 603-declined. Anyone on how to make opensips wait for the message to complete, and then return 404?

On Sat, Oct 13, 2012 at 11:06 PM, Max Mühlbronner <[hidden email]> wrote:

Hi,

 

regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.

 

Best Regards

 

Max M.

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Remco .
Gesendet: Samstag, 13. Oktober 2012 22:52
An: OpenSIPS users mailling list
Betreff: [OpenSIPS-Users] Route to media-server, but reply negative

 

Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +92 334 422 40 88
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

Flavio Goncalves
In reply to this post by Remco .
Remco

Use hangup(3) and Asterisk will send a 404 


ISUP Cause value SIP response

1 unallocated number 404 Not Found
2 no route to network 404 Not found
3 no route to destination 404 Not found
16 normal call clearing --- (*)
17 user busy 486 Busy here
18 no user responding 408 Request Timeout
19 no answer from the user 480 Temporarily unavailable
20 subscriber absent 480 Temporarily unavailable
21 call rejected 403 Forbidden (+)
22 number changed (w/o diagnostic) 410 Gone
22 number changed (w/ diagnostic) 301 Moved Permanently
23 redirection to new destination 410 Gone
26 non-selected user clearing 404 Not Found (=)
27 destination out of order 502 Bad Gateway
28 address incomplete 484 Address incomplete
29 facility rejected 501 Not implemented
31 normal unspecified 480 Temporarily unavailable

Flavio E. Goncalves
SipPulse Routng and Billing Solutions for SIP. 
 



2012/10/14 Remco . <[hidden email]>
Thanks Max. That does the trick for the Asterisk part. However, calls are now returned with 603-declined. Anyone on how to make opensips wait for the message to complete, and then return 404?

On Sat, Oct 13, 2012 at 11:06 PM, Max Mühlbronner <[hidden email]> wrote:

Hi,

 

regarding asterisk as media-server, you could use the “noanswer” option for playback(). Then it will signal audio via progress messages but will not answer (200 OK) the call.

 

Best Regards

 

Max M.

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Remco .
Gesendet: Samstag, 13. Oktober 2012 22:52
An: OpenSIPS users mailling list
Betreff: [OpenSIPS-Users] Route to media-server, but reply negative

 

Hi all,

I have the following in the failure_route, for invalid destinations:

                if(t_check_status("404")) {
                        # Dialed phone number does not exist

                        # Cancel call billing
                        resetflag(1);

                        # Start announcement
                        seturi("sip:AN_invalidnumber@[ip of mediaserver]:5060");
                        t_relay();

                        #t_reply("404", "Not found");
                        exit;
                }

When a 404 reply is received from upstream carrier(s) I would like to play an announcement to let the user know they made a mistake in the phone number.
On the other hand, I would like those calls to show up as '404' in my statistics. Ideally the announcement should be played in the early media (don't know if that's possible with Asterisk as a media server?).
The announcement works, however returns 200-OK. If I uncomment the 't_reply', the call is ended to soon without allowing the announcement to be played.

Does anyone how to solve this? I tried branching but I cannot get it to work.

Thanks,
Remco.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Route to media-server, but reply negative

MarcLangsdorf
In reply to this post by Remco .
Hi,

you can use SEMS with early announce module for this.

http://ftp.iptel.org/pub/sems/doc/current/ModuleDoc_early_announce.html

It does exactly what you are searching for.

Best Regards
Marc Langsdorf