Álvaro Palma
2006-Mar-07 11:34 UTC
[Asterisk-Users] Changing REINVITE status of the channel dynamically
I've an Asterisk server running in my office, which forwards all long distance calls to a third party SIP service using an extension rule: exten => _1XX0.,1,Dial(SIP/{EXTEN:4}@external_sip_server.com) (1XX0 is the international calls rule for Chile) Also, in my sip.conf, I've defined canreinvite=yes to decrease the network load to the server caused by the RTP. However, the external sip server seems to be buggy, because the REINVITE's against it only works for certain routes, and in others, it simply hang up the calls. Since I don't have control over that remote service (and I already inform them about this problem), I'd like to know if it's possible to set the REINVITE on or off dynamically, based on the extension being dialed. I don't like very much the option to completely disable the REINVITE's in my network (formed by a central, and a lot of offices connected to it by not too fast links, so the network usage is an issue) Thanks a lot for your help. -- Atly. Alvaro Palma
Luki
2006-Mar-08 10:54 UTC
[Asterisk-Users] Changing REINVITE status of the channel dynamically
> I'd like to know if it's possible to set the REINVITE on or off dynamically, > based on the extension being dialed.Define two peers in sip.conf, one with canreinvite=yes and the second with canreinvite=no. Then you can route your calls with or without reinvites depending on the dialed number. Like: [provider-reinvite] type=peer host=external_sip_server.com canreinvite=yes ... [provider-noreinvite] trype=peer host=external_sip_server.com canreinvite=no ... exten => _1[0-4]X0.,1,Dial(SIP/{EXTEN:4}@provider-reinvite) exten => _1[5-9]X0.,1,Dial(SIP/{EXTEN:4}@provider-noreinvite) --Luki