ArticleDirectory
- Fork Module
- No. 1 dual-host
The No. 1 dual-host service refers to the caller who calls a called phone number. Two or more calls bound to the called phone call at the same time. Either of them can answer the call first. After the first call, the other calls will stop ringing.
Most of the functions implemented by traditional switches are implemented on the intelligent network platform (in), which can be easily implemented on the softswitch platform such as Yate. The specific method is as follows.
Implementation principle: it is still in the routing module. When the routing module receives a route request and meets the called Number conditions, it initiates a call to the two called phones at the same time (SIP: invite), until one of them receives and then releases other calls (SIP: Cancel ). This can be achieved through the fork and regexroute modules of Yate.
Fork Module
The fork module is used to route a call to multiple selectable destinations. There are two basic usage methods. Call in sequence. If the first call fails, the subsequent call is executed. Otherwise, the connection is complete.
^. * $ = Fork Sip/SIP:/0 @ host1 | h323 // 0 @ host2 | Sip/SIP:/0 @ host3; stoperror = busy
In the preceding example, if the call is 9999, the call is first transferred to the SIP: 9999 @ host1. If the SIP: 9999 @ host1 receives the call, the route is completed; if the call fails, transfer the call to h323/9999 @ host2, and so on.
^. * $ = Fork Sip/SIP:/0 @ host1 h323 // 0 @ host2 Sip/SIP:/0 @ host3; stoperror = busy
In the above example, if the call is 9999, Yate will call SIP: 9999 @ host1, h323/9999 @ host2, and SIP: 9999 @ host3 at the same time, as long as one of them is answered, cancel the call to the other two. If none of them are successful, the system returns the busy voice.
No. 1 dual-host
According to the fork module, we certainly know that the second method can be used to easily implement the No. 1 dual-Host:
^ 99998888 $ = fork Sip/SIP: 99998888@192.168.114.51 Sip/SIP: 99997777@192.168.114.51
In this way, when 99998888 users are called, both 99998888 and 99997777 users are called at the same time, achieving dual-HOST 1!