[Freeswitch-users] Originate between two registered endpoints

Jonas Gauffin jonas.gauffin at gmail.com
Thu Oct 4 06:14:11 PDT 2007


To answer my own question after digging around a bit in the code.

HOLD seems to just tell FS that it shouldnt do anything with the
channel unless something else happens.

SWITCH_EVENT_CHANNEL_PARK is what I was looking for.

On 10/4/07, Jonas Gauffin <jonas.gauffin at gmail.com> wrote:
> Hello
>
> I'm originating a call from one phone (caller) to another
> (destination). Both are registered in FreeSwitch.
>
> Why do the destination phone get a channel_state HOLD event just after
> channel_state RING?
> Isn't hold only supposed to be sent when the user actually put's
> someone on hold?
>
> I'm wondering since I'm handling all channel events in a switch
> monitoring program, and I should show "offering" (a call is being
> offered to the phone) and not "onhold" in this case.
>
> I'm not posting this as a bug since it might just be me who doesnt
> understand the event flow (in that case, please explain why the HOLD
> state is there and how I can see when the call is actually being put
> on hold).
>
> The log (just those two events, tell me if you need the whole log):
>
> Content-Length: 2237
> Content-Type: text/event-plain
>
> Channel-State: CS_RING
> Channel-State-Number: 2
> Channel-Name: sofia/mydomain.com/jonas
> Unique-ID: 87689d22-084d-5243-bfe5-e4284bdc0f8a
> Caller-Username: arne
> Caller-Dialplan: XML
> Caller-Caller-ID-Name: arne
> Caller-Caller-ID-Number: arne
> Caller-Network-Addr: 192.168.1.100
> Caller-Destination-Number: mydomain.com/jonas
> Caller-Unique-ID: 3c07eae2-c633-314a-8bb0-0a7489631648
> Caller-Source: mod_sofia
> Caller-Context: default
> Caller-Channel-Name: sofia/mydomain.com/arne%40mydomain.com%3A5060
> Caller-Channel-Created-Time: 1191488351994829
> Caller-Channel-Answered-Time: 0
> Caller-Channel-Hangup-Time: 0
> Caller-Channel-Transfer-Time: 0
> Caller-Screen-Bit: yes
> Caller-Privacy-Hide-Name: no
> Caller-Privacy-Hide-Number: no
> Originator-Username: arne
> Originator-Dialplan: XML
> Originator-Caller-ID-Name: arne
> Originator-Caller-ID-Number: arne
> Originator-Network-Addr: 192.168.1.100
> Originator-Destination-Number: 8335
> Originator-Unique-ID: 3c07eae2-c633-314a-8bb0-0a7489631648
> Originator-Source: mod_sofia
> Originator-Context: default
> Originator-Channel-Name: sofia/mydomain.com/arne%40mydomain.com%3A5060
> Originator-Screen-Bit: yes
> Originator-Privacy-Hide-Name: no
> Originator-Privacy-Hide-Number: no
> variable_signal_bond: 3c07eae2-c633-314a-8bb0-0a7489631648
> variable_local_media_ip: 192.168.1.102
> variable_switch_m_sdp:
> v%3D0%0D%0Ao%3D-%2084341423%2029230295%20IN%20IP4%20192.168.1.100%0D%0As%3DSIP%20CALL%0D%0Ac%3DIN%20IP4%20192.168.1.100%0D%0At%3D0%200%0D%0Am%3Daudio%201722%20RTP/AVP%2018%204%200%208%203%20101%0D%0Aa%3Drtpmap%3A18%20G729/8000%0D%0Aa%3Drtpmap%3A4%20G723/8000%0D%0Aa%3Drtpmap%3A0%20PCMU/8000%0D%0Aa%3Drtpmap%3A8%20PCMA/8000%0D%0Aa%3Drtpmap%3A3%20GSM/8000%0D%0Aa%3Drtpmap%3A101%20telephone-event/8000%0D%0Aa%3Dfmtp%3A101%200-15%0D%0A
> variable_originator_codec: PCMU%408000k%4020i
> variable_max_forwards: 70
> variable_originator: 3c07eae2-c633-314a-8bb0-0a7489631648
> variable_local_media_port: 16392
> Event-Name: CHANNEL_STATE
> Core-UUID: 4cbb1411-28c6-cc49-a1f2-8fbe8a8e5a2c
> Event-Date-Local: 2007-10-04%2010%3A59%3A11
> Event-Date-GMT: Thu,%2004%20Oct%202007%2008%3A59%3A11%20GMT
> Event-Date-timestamp: 1191488351994829
> Event-Calling-File: switch_channel.c
> Event-Calling-Function: switch_channel_perform_set_state
> Event-Calling-Line-Number: 746
>
> Content-Length: 476
> Content-Type: text/event-plain
>
> Channel-State: CS_HOLD
> Channel-State-Number: 6
> Channel-Name: sofia/mydomain.com/jonas
> Unique-ID: 87689d22-084d-5243-bfe5-e4284bdc0f8a
> Event-Name: CHANNEL_STATE
> Core-UUID: 4cbb1411-28c6-cc49-a1f2-8fbe8a8e5a2c
> Event-Date-Local: 2007-10-04%2010%3A59%3A11
> Event-Date-GMT: Thu,%2004%20Oct%202007%2008%3A59%3A11%20GMT
> Event-Date-timestamp: 1191488351994829
> Event-Calling-File: switch_channel.c
> Event-Calling-Function: switch_channel_perform_set_state
> Event-Calling-Line-Number: 746
>
> Thanks,
>   Jonas
>




More information about the FreeSWITCH-users mailing list