Hi, just wondering whether the following scenario (which it's not possible in kamailio 1.5) is possible in 3.X:
1) Alice calls a PSTN number.
2) Proxy receives the call and routes it to a media server which plays an early-announcement (30 seconds long).
3) After N seconds (maybe 10 seconds) proxy starts a new parallel branch to the PSTN gateway *without* cancelling the previous branch with the media server.
4) Let's suppose the PSTN phone rings and proxy gets 183 with SDP (ringing in real audio). Proxy converts such 183 into a 180 with no SDP (already possible in Kamailio).
5) After 30 seconds media server rejects the call with 480. PSTN branch remains ringing as usual.
I just would like to know if Kamailio 3.X allows point 3. I think it's hard but maybe I miss some feature.
Thanks a lot.
Hello,
On 5/30/11 1:14 PM, Iñaki Baz Castillo wrote:
Hi, just wondering whether the following scenario (which it's not possible in kamailio 1.5) is possible in 3.X:
Alice calls a PSTN number.
Proxy receives the call and routes it to a media server which plays
an early-announcement (30 seconds long).
- After N seconds (maybe 10 seconds) proxy starts a new parallel
branch to the PSTN gateway *without* cancelling the previous branch with the media server.
- Let's suppose the PSTN phone rings and proxy gets 183 with SDP
(ringing in real audio). Proxy converts such 183 into a 180 with no SDP (already possible in Kamailio).
- After 30 seconds media server rejects the call with 480. PSTN
branch remains ringing as usual.
I just would like to know if Kamailio 3.X allows point 3. I think it's hard but maybe I miss some feature.
the best you have to code it in C, should not be that hard: - keep the transaction ID in some list - after a while, based on a timer process, lookup transaction - add a branch and forward it
Or, if possible, fake somehow a negative reply and inject it from the network, then kamailio will trigger a failure route, the media server will still play.
Or put another proxy before media server, use rtimer+mqueue to cancel a transaction after a while with: http://kamailio.org/docs/modules/stable/modules_k/tmx.html#id2784882
Inside intermediary proxy, drop the cancels. It might work at the end :-)
Cheers, Daniel
2011/5/31 Daniel-Constantin Mierla miconda@gmail.com:
the best you have to code it in C, should not be that hard:
- keep the transaction ID in some list
- after a while, based on a timer process, lookup transaction
- add a branch and forward it
Or, if possible, fake somehow a negative reply and inject it from the network, then kamailio will trigger a failure route, the media server will still play.
Or put another proxy before media server, use rtimer+mqueue to cancel a transaction after a while with: http://kamailio.org/docs/modules/stable/modules_k/tmx.html#id2784882
Inside intermediary proxy, drop the cancels. It might work at the end :-)
Thanks a lot Daniel. Finally it seems that the late branch would always arrive to a PSTN gateway under our control, so calling like a "Sleep(10)" function in the gw before it relays the call to the carriers would do the job in an easily way.
I hope this is finally the case. If not, let's code C :)
Cheers.